Skip to content

Commit

Permalink
chore: add pre-commit config file
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitdm-oslandia committed Apr 10, 2024
1 parent dce939d commit 06a5dd6
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

# Don't run pre-commit on files under third-party/
exclude: "^\
(third-party/.*)\
"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files # prevents giant files from being committed.
- id: check-case-conflict # checks for files that would conflict in case-insensitive filesystems.
- id: check-merge-conflict # checks for files that contain merge conflict strings.
- id: check-yaml # checks yaml files for parseable syntax.
- id: detect-private-key # detects the presence of private keys.
- id: end-of-file-fixer # ensures that a file is either empty, or ends with one newline.
- id: fix-byte-order-marker # removes utf-8 byte order marker.
- id: mixed-line-ending # replaces or checks mixed line ending.
- id: requirements-txt-fixer # sorts entries in requirements.txt.
- id: trailing-whitespace # trims trailing whitespace.

- repo: https://github.com/ssciwr/clang-format-hook
rev: v16.0.2
hooks:
- id: clang-format
# args: [--style=file:/home/bde/prog/sfcgal/SFCGAL/.clang-format]
files: \.(c|h|cpp|hpp)$

# - repo: https://github.com/pocc/pre-commit-hooks
# rev: v1.3.5
# hooks:
# - id: clang-tidy
# files: (src|tests)/.*\.(c|h|cpp|hpp)$

# - id: cppcheck
# name: cppcheck
# entry: cppcheck
# language: system
# args:
# [
# --enable=all,
# --suppress=unusedFunction,
# --suppress=unmatchedSuppression,
# --suppress=missingIncludeSystem,
# --suppress=toomanyconfigs,
# --error-exitcode=1,
# --language=c++,
# ]
# files: \.(c|h|cpp|hpp)$

0 comments on commit 06a5dd6

Please sign in to comment.