mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
git: add pre-commit dependency
This also adds documentation for how to install this git pre-commit hook which will run black before committing. The only downside to doing that is the, perhaps confusing, initial run which will clone the black repository before a dev's first commit. Running on the command-line will be quite obvsious since the default output shows what pre-commit is doing. But running in a gui or editor (e.g. magit) will hide that. Viewer discretion is advised.
This commit is contained in:
parent
b570b50836
commit
ec3d2ca8ad
4 changed files with 11 additions and 0 deletions
5
.pre-commit-config.yaml
Normal file
5
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
repos:
|
||||
- repo: https://github.com/ambv/black
|
||||
rev: stable
|
||||
hooks:
|
||||
- id: black
|
|
@ -130,6 +130,10 @@ our tests)::
|
|||
|
||||
$ black --check --exclude=xonsh/ply/ xonsh/ xontrib/
|
||||
|
||||
To add this as a git pre-commit hook::
|
||||
|
||||
$ pre-commit install
|
||||
|
||||
**********
|
||||
Imports
|
||||
**********
|
||||
|
|
|
@ -9,3 +9,4 @@ matplotlib
|
|||
doctr
|
||||
tornado
|
||||
black
|
||||
pre-commit
|
||||
|
|
|
@ -9,3 +9,4 @@ pygments>=2.2
|
|||
codecov
|
||||
coverage
|
||||
black
|
||||
pre-commit
|
||||
|
|
Loading…
Add table
Reference in a new issue