Skip to content

Add default lint checks. #6

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

Merged
merged 2 commits into from
Dec 6, 2017
Merged

Add default lint checks. #6

merged 2 commits into from
Dec 6, 2017

Conversation

tannewt
Copy link
Member

@tannewt tannewt commented Dec 6, 2017

Two example commits that implement changes based on lint are adafruit/Adafruit_CircuitPython_BME280#3 and adafruit/Adafruit_CircuitPython_DotStar#8.

The lint file is pylint's defaults with a few changes:

  • import-error turned off because CircuitPython built-ins trigger it
  • Line endings is also stricter with LF.
  • Class names can have underscores. (Though we may want to stop this in the future.)
  • r, g, b and n are whitelisted single character variable names.

Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Since it works I don't have a lot to say about the .travis.yml stuff.

In .pylintrc, could you include the original settings in a comment line and then duplicate the line below with our changes? That way we can see how we deviate from the norm. E.g.,

#good-names=i,j,k,ex,Run,_
good-names=r,g,b,i,j,k,n,ex,Run,_

@tannewt
Copy link
Member Author

tannewt commented Dec 6, 2017

@dhalbert Done.

Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thanks for putting in the differences.

@dhalbert dhalbert merged commit d8cf263 into adafruit:master Dec 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants