Last active
August 9, 2025 10:52
-
-
Save habedi/9f32bf483552ed04f2a30fc8156e2269 to your computer and use it in GitHub Desktop.
A generic pre-commit configuration file for projects managed by GNU Make
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| default_stages: [ pre-push ] | |
| fail_fast: false | |
| repos: | |
| - repo: https://github.com/pre-commit/pre-commit-hooks | |
| rev: v5.0.0 | |
| hooks: | |
| - id: trailing-whitespace | |
| args: [ --markdown-linebreak-ext=md ] | |
| - id: end-of-file-fixer | |
| - id: mixed-line-ending | |
| - id: check-merge-conflict | |
| - id: detect-private-key | |
| - id: check-yaml | |
| - id: check-toml | |
| - id: check-json | |
| - id: check-docstring-first | |
| - id: check-added-large-files | |
| args: [ --maxkb=500 ] | |
| - id: pretty-format-json | |
| args: [ --autofix, --no-sort-keys ] | |
| - repo: local | |
| hooks: | |
| - id: format | |
| name: Format the code | |
| entry: make format | |
| language: system | |
| pass_filenames: false | |
| stages: [ pre-commit ] | |
| - id: lint | |
| name: Run the linter checks | |
| entry: make lint | |
| language: system | |
| pass_filenames: false | |
| stages: [ pre-commit ] | |
| - id: test | |
| name: Run the tests | |
| entry: make test | |
| language: system | |
| pass_filenames: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment