You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add option to simply run a command, without git repo #344
Would be really great if pre commit supported the option to run a certain command to do the checking, just handling the passing of filenames to the command.
This would allow isort to work correctly (see #181, about why it doesn't work). And would allow a CI environment to use the same executable, without the need for another repo just to manage something that is in fact related to the project.
Also this would make sure my editor (Atom in this case) will use the exact same version of the file as the pre-commit hook, preventing issues from everything looking fine in my editor, but then the hook failing because of a version difference.
That said, I've written https://github.com/asottile/reorder_python_imports which works entirely statically opposed to the dynamic analysis that isort does -- we use it at yelp and it works great for our usecases :)
Activity
asottile commentedon Feb 8, 2016
I believe this satisfies this: #226
It needs documentation however
asottile commentedon Feb 8, 2016
That said, I've written https://github.com/asottile/reorder_python_imports which works entirely statically opposed to the dynamic analysis that isort does -- we use it at yelp and it works great for our usecases :)
asottile commentedon Feb 8, 2016
In your case I believe the config you'd want is:
hvdklauw commentedon Feb 8, 2016
Thanks, that's nice. Maybe the documentation should mention this :-(
On Mon, 8 Feb 2016, 21:35 Anthony Sottile notifications@github.com wrote:
asottile commentedon May 4, 2016
local hooks are now documented here: http://pre-commit.com/#repository-local-hooks