Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repos:
- repo: local
hooks:
- id: codeformat_c
name: codeformat-c
language: system
entry: poetry run ./tools/codeformat.py -cf
types: [c]
- id: codeformat_py
name: codeformat-py
language: system
entry: poetry run ./tools/codeformat.py -p
types: [python]
pass_filenames: false
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,16 @@ Before committing your changes, be sure to run:
This will automatically fix common problems in files that follow the MicroPython
style.

This can be run automatically before making a commit using [pre-commit][]. To
enable it, run:

poetry run pre-commit install

It will install a pre-commit git hook for this repository. On every commit,
the coding style will be checked and fixed before the commit is done.

[pre-commit]: https://pre-commit.com/


### Logical commits

Expand Down
Loading