-
Notifications
You must be signed in to change notification settings - Fork 633
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
Pass filenames to only lint changed files in pre-commit. #7433
Pass filenames to only lint changed files in pre-commit. #7433
Conversation
How are you running When I run |
Oh, I see. If you use |
I think my assumptions about how this all worked in #7401 are wrong. It's more like if you want to use But in the context of Travis CI, I would prefer to have no filenames passed into the command so that the logs that result during a failure are less verbose. I don't know if you can have both of these. |
Codecov Report
|
Co-authored-by: Jonathan Boiser <jonboiser@users.noreply.github.com>
Yeah - although I think we don't get as messy output from our other hooks, right? So if it's just the linting command that is problematic, we can fix that up to try to make something less messy. Do you have a specific example of the messy output that we could look at more to try to make this better? |
Something like this is what I was trying to fix earlier: https://travis-ci.org/github/learningequality/kolibri/jobs/711456164#L1082 At Line 1082 it logs the full command, which goes on for a few screenfuls of file paths, then finally to the actual linting error. |
relevant recent PR: #6583 |
Hrm - do other linting hooks suffer from the same issue, or is it just ours? |
The 'import order' output is very concise when it "fails". Maybe we can see what is different about these community plugins to see if we can make the linting hook less verbose. But I'll merge this for now to improve people's git workflows.
|
Summary
Pre-commit is still linting all files, rather than just changed files.
Makes pre-commit pass filenames again to make this happen.
Reviewer guidance
Does Travis still pass?
Contributor Checklist
PR process:
Testing:
Reviewer Checklist
yarn
andpip
)