Skip to content

Commit

Permalink
Add pre commit script (#285)
Browse files Browse the repository at this point in the history
* added pre-commit hook

* updated pre-commit config

* updated readme related to pre-commit
  • Loading branch information
introkun authored Jan 31, 2021
1 parent d05ed5f commit 9a787c8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-case-conflict
- id: fix-encoding-pragma
- id: mixed-line-ending
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ You can find a copy of the license in the [LICENSE file](./LICENSE).
Exemptions:
* [nsz](https://github.com/nicoboss/nsz) is exempt from the GPLv3 licensing and can license any source code from this project under MIT License instead. In doing so, they may alter, supplement, or entirely remove the copyright notice for each file they choose to relicense.

## Contributing

Contributions are welcome!

To prevent continuous integration failures when contributing, please consider installing
[pre-commit](https://pre-commit.com/) in your environment to run all of these checks
prior to checking in new code.

```shell
pre-commit install
```

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Expand Down
1 change: 1 addition & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ invoke~=1.4.0
coverage~=5.3
coveralls~=2.2.0
rope~=0.18.0
pre-commit~=2.10.0

0 comments on commit 9a787c8

Please sign in to comment.