Skip to content
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

Add automatic linting. #622

Merged
merged 13 commits into from
Apr 4, 2019
Merged

Add automatic linting. #622

merged 13 commits into from
Apr 4, 2019

Conversation

nworden
Copy link
Contributor

@nworden nworden commented Apr 4, 2019

Discussed on issue #619.

This sets us up to use two tools for style/formatting checks:

  • yapf, which is not very thorough but can fix things automatically.
  • pylint, which is nothing if not thorough, but can't help you fix things.

This updates the tools/lint script (which doesn't work anymore as-is, at least not for me), to have options for yapf and pylint. Eventually, I'd like to get the whole codebase compliant, but that's not going to happen anytime soon, at least not from pylint's perspective. So, by default it has two separate lists of files to check (one for yapf and one for pylint). My plan is to ask people to run yapf anytime they touch a file, and to ensure that new files pass both yapf and pylint. I have no particular plan for how to get existing files in line with pylint (I wouldn't want to block PRs on updating any random file you touch); maybe I'll aim to fix two or three a week until it's done.

@nworden nworden changed the title Add automatic linting. Fixes #619. Add automatic linting. Apr 4, 2019
@nworden nworden merged commit 60345e7 into google:master Apr 4, 2019
@nworden nworden deleted the lint branch April 4, 2019 17:01
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