-
Notifications
You must be signed in to change notification settings - Fork 75
Use lintrunner #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use lintrunner #168
Conversation
Codecov Report
@@ Coverage Diff @@
## main #168 +/- ##
=======================================
Coverage 81.04% 81.04%
=======================================
Files 66 66
Lines 5133 5133
=======================================
Hits 4160 4160
Misses 973 973
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@abock @gramalingam please take a look, thanks! I would like to make sure licensing and attribution is good for files under |
What does new friends: newlines/grep do? |
Do you mean from a legal perspective? Let me defer that to Aaron. I guess it should not be a problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lintrunner found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
It's MIT licensed, so no issues here as long as the original license files, annotations, and copyrights are preserved. However, is there a reason for including all the code in the repo? Can this be installed as a build dependency or should we submodule it? I will do a deeper review tomorrow. |
The original adapters are part of the pytorch repo. I guess we can create a package for these adapters? For now they live in https://github.com/justinchuby/lintrunner-adapters |
Alternatively we can create a new repo in the ms org and share it as a submodule across the various onnx projects |
Feel like it makes more sense that each repo has its own adapters though. Or it could affect multiple repos, if one of the repo wanted a new formatting. |
I thought about it again and realized things are much easier and cleaner with a package. I created https://pypi.org/project/lintrunner-adapters/. |
38fb324
to
104c462
Compare
Format and config Add license Add black black Black isort Lintrunner config Specify versions Lint Fixme Run lintrunner Update readme Fix dependency Fix config Update dlint Use sarif update pyproject Try this Revert "Try this" This reverts commit 95ac6dc. Fix docstyle pydocstyle reference Update sarif converter Fill lines
104c462
to
7907af2
Compare
|
||
# exclude from sdist | ||
exclude *.onnx | ||
# include |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normalized line endings to POSIX
@gramalingam PTAL. I think this PR is now purely formatting. Should be straight forward (hopefully) |
Adopt lintrunner for running all linters locally and in CI. https://github.com/suo/lintrunner
lintrunner -a
to fix all lint errorsNice SARIF error messages:
e.g. https://github.com/microsoft/onnx-script/security/code-scanning/335