Skip to content

Commit dcf11f7

Browse files
committed
Add pre-commit config
1 parent 8d5ca52 commit dcf11f7

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.pre-commit-config.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-case-conflict
8+
- id: check-docstring-first
9+
- id: check-executables-have-shebangs
10+
- id: check-shebang-scripts-are-executable
11+
- id: mixed-line-ending
12+
- id: debug-statements
13+
- id: destroyed-symlinks
14+
- id: fix-byte-order-marker
15+
- id: check-merge-conflict
16+
- id: name-tests-test
17+
args: [--pytest-test-first]
18+
19+
- repo: https://github.com/pycqa/flake8
20+
rev: '7.2.0'
21+
hooks:
22+
- id: flake8
23+
24+
- repo: https://github.com/codespell-project/codespell
25+
rev: v2.4.1
26+
hooks:
27+
- id: codespell

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ online.
5353
- Submit bugs through the [OpenModelica GitHub issues](https://github.com/OpenModelica/OMPython/issues/new).
5454
- [Pull requests](https://github.com/OpenModelica/OMPython/pulls) are welcome.
5555

56+
57+
## Development
58+
It is recommended to set up [`pre-commit`](https://pre-commit.com/) to
59+
automatically run linters:
60+
```sh
61+
# cd to the root of the repository
62+
pre-commit install
63+
```
64+
5665
## Contact
5766

5867
- Adeel Asghar, <[email protected]>

0 commit comments

Comments
 (0)