Skip to content

Commit

Permalink
add pre-commit functionality and intial execution
Browse files Browse the repository at this point in the history
  • Loading branch information
Mausy5043 committed Jul 28, 2024
1 parent 30f494c commit 432fee8
Show file tree
Hide file tree
Showing 5 changed files with 938 additions and 924 deletions.
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These checks must pass before you may commit changes
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ When you want to make changes, the best way to do that is by creating a [feature
Code style formatting of all commits must adhere to `black --line-length 98`.
* Please use `pylint` with this project's `.pylintrc` and `flake8` and `pydocstyle` using the project's `tox.ini` to discover suggestions for code improvement.
Since the code isn't perfect you are free to ignore any suggestions by the linters that are unrelated to your changes. However, you are also welcome to fix those suggestions if you want ;-)
* For C, C++ sources we prefer to use [`cpplint`](https://pypi.org/project/cpplint/) for linting and [`clang-format`](https://pypi.org/project/clang-format/) to correct code formatting.
* For C, C++ sources we prefer to use [`cpplint`](https://pypi.org/project/cpplint/) for linting and [`clang-format`](https://pypi.org/project/clang-format/) to correct code formatting.
Here too we use a line length of <= 98.

To run pre-commit hooks you may need to `pip install pre-commit` or `conda install pre-commit` and `pre-commit run --all-files` on first use.

Note that most, if not all, of us do this in our free time, so sometimes you get a quick response and other times it may take longer.
We assume that you've read GitHub's help page [regarding pull requests](https://help.github.com/articles/using-pull-requests/).
Loading

0 comments on commit 432fee8

Please sign in to comment.