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
Enabled linter for azurelinuxagent.daemon. #1979
Enabled linter for azurelinuxagent.daemon. #1979
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1979 +/- ##
========================================
Coverage 71.14% 71.14%
========================================
Files 86 86
Lines 12285 12285
Branches 1728 1728
========================================
Hits 8740 8740
Misses 3159 3159
Partials 386 386
Continue to review full report at Codecov.
|
Can we add a table of the errors for the agent, maybe as comments in one of the configuration files? |
2.7.pylintrc
Outdated
|
||
[MESSAGES CONTROL] | ||
|
||
disable=bad-option-value,misplaced-comparison-constant,no-self-use,consider-iterating-dictionary, |
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.
can we add a short description of each suppresion?
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.
Maybe even a link pointing to the suppression docs with the description if possible?
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.
@kevinclark19a - my main goal is to make it easy to fix the code... i'm thinking we would come to this file, read the description of the issues, pick up one, highlight the code or symbol, do a global search on the code using the highlighted text, and then go fix each instance
old-style-class, deprecated-lambda, | ||
duplicate-code #TODO: | ||
|
||
[SIMILARITIES] |
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.
what does this section do?
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.
This are fine tuning options for the duplicate-code
error message. It determines under which conditions that error will be reported.
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.
thanks, may be a good idea to add a comment that this is for duplicate-code
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.
Would it be better to just link to the pylintrc options documentation? That would have the description of all of the sections, I think.
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.
if you want, you can do that.
i read the comments below, e.g. "# Minimum lines number of a similarity." and I had no idea what that was. A short comment on the section, e.g. "Settings for duplicate-code" would allow the reader to get a quick idea of what this is about without having to reach out to the documentation.
3.6.pylintrc
Outdated
|
||
[MESSAGES CONTROL] | ||
|
||
disable=misplaced-comparison-constant,no-self-use,consider-iterating-dictionary, |
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.
can we list the suppressions in alphabetical order, one per line? it is hard to compare this list with the list for 2.7
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.
I agree. Do the suppressions map one to one to error codes? If so, can we add those as comments here so it's easier to refer to the error codes in the code?
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.
Sure. Working on this!
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.
so it's easier to refer to the error codes in the code?
Can we either put the error codes here or put the short names in the supression comments in the code just to keep it consistent? This ofcourse in addition to having the a mapped description with maybe the public link for each suppression too?
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.
I put both the symbol and the error code in the comments here.
@@ -3,7 +3,8 @@ os: linux | |||
dist: xenial | |||
language: python | |||
env: | |||
- NOSEOPTS="--verbose --with-timer" SETUPOPTS="" | |||
- >- | |||
NOSEOPTS="--verbose --with-timer" SETUPOPTS="" |
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.
let's remove all the flake8 stuff
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.
LGTM! Excited to enable linting once all of your changes go in 😎
Description
5th of 7 PRs enabling linter in Travis.
Error Codes can be found here: http://pylint.pycqa.org/en/latest/technical_reference/features.html
PR information
Quality of Code and Contribution Guidelines