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

Run `lint` in commit hooks #5666

Merged
merged 1 commit into from Apr 5, 2018

Conversation

Projects
None yet
2 participants
@stuhood
Copy link
Member

stuhood commented Apr 5, 2018

Problem

The third travis shard runs ./pants lint, and frequently fails with trivial errors like unused imports.

Solution

Add ./pants --changed-parent=master lint to the pre-commit hooks.

@stuhood stuhood requested review from jsirois , wisechengyi and illicitonion Apr 5, 2018

@stuhood stuhood force-pushed the twitter:stuhood/lint-in-commit-hooks branch from 02feba8 to aec80d1 Apr 5, 2018

@stuhood

This comment has been minimized.

Copy link
Member

stuhood commented Apr 5, 2018

For the record: I've been running this command manually before pushing: it generally takes on the order of 5-10 seconds, and catches the errors mentioned in the description.

@baroquebobcat
Copy link
Contributor

baroquebobcat left a comment

Sounds good to me.

Would it make sense to have a separate change that adds an lint.isort using the --check-only flag? Then we could drop the separate call.

@stuhood

This comment has been minimized.

Copy link
Member

stuhood commented Apr 5, 2018

Would it make sense to have a separate change that adds an lint.isort using the --check-only flag? Then we could drop the separate call.

Yes, but that would require significant code changes, afaict.

@stuhood stuhood merged commit 03c48c9 into pantsbuild:master Apr 5, 2018

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@stuhood stuhood deleted the twitter:stuhood/lint-in-commit-hooks branch Apr 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment