This repository has been archived on 2022-02-10. You can view files and clone it, but cannot push or open issues or pull requests.
fortuna/.pre-commit-config.yaml
surtur 56e6aa6b15
All checks were successful
continuous-integration/drone/push Build is passing
pre-commit: no need for args
as per the website:
  When creating local hooks, there's no reason to put command arguments
  into args as there is nothing which can override them -- instead put
  your arguments directly in the hook entry.

ref: https://pre-commit.com/#arguments-pattern-in-hooks

also add some little niceness to 'make test'
2021-12-29 04:45:23 +01:00

46 lines
1.2 KiB
YAML

---
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-merge-conflict
exclude: ^lib/
- repo: meta
hooks:
- id: check-hooks-apply
exclude: ^lib/
- repo: https://github.com/pocc/pre-commit-hooks
rev: v1.3.4
hooks:
- id: cppcheck
args: ["--language=c++", "--std=c++20",
"--enable=warning,performance,portability,information,unusedFunction,missingInclude",
"--verbose"]
files: \.(cpp|cc|cxx,h)$
types: [file, c++]
types_or: [file, c++, header]
exclude: ^lib/
- repo: https://github.com/gringolito/cpp-pre-commit-hooks
rev: 3481ddf0fb
hooks:
- id: check-using-namespace-directive
exclude: ^lib/
- repo: local
hooks:
- id: make-test
name: make test
entry: nice -n 3 make test
language: system
pass_filenames: false
- id: build-release
name: make release
entry: make release
language: system
pass_filenames: false
- id: make-san
name: make san
entry: make san
language: system
pass_filenames: false