Skip to content

Commit

Permalink
Update installation.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-tz authored Nov 30, 2023
1 parent ce2f111 commit 0c15ea5
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions doc/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,22 +112,27 @@ We use the following tools to ensure consistent code style and formatting:
We use [pre-commit](https://pre-commit.com/) so that its trivial to run the same linters & configuration locally as in CI.

Run all linters liks:
❯ pre-commit run --all-files
isort....................................................................Passed
black....................................................................Passed
mypy.....................................................................Passed

```
❯ pre-commit run --all-files
isort....................................................................Passed
black....................................................................Passed
mypy.....................................................................Passed
```

Or run a single linter like:
❯ pre-commit run --all-files isort
isort....................................................................Passed
```
❯ pre-commit run --all-files isort
isort....................................................................Passed
```

Importantly, you can configure pre-commit to run automatically before every commit by running:
```
❯ pre-commit install --hook-type pre-commit
pre-commit installed at .git/hooks/pre-commit
❯ pre-commit install --hook-type pre-commit
pre-commit installed at .git/hooks/pre-commit

❯ pre-commit install --hook-type pre-push
pre-commit installed at .git/hooks/pre-push
❯ pre-commit install --hook-type pre-push
pre-commit installed at .git/hooks/pre-push
```

This way you can ensure that you don't commit code style or formatting offenses.
You can always temporarily skip the checks by using the `-n`/`--no-verify` git option.
Expand Down

0 comments on commit 0c15ea5

Please sign in to comment.