Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pre-built hooks in pre commit #402

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .github/scripts/clang-format-hook

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
cd $STARTDIR
python3 -m venv /root/pre-commit-venv
source /root/pre-commit-venv/bin/activate
pip install pre-commit ruff
pip install pre-commit
cmake -DENABLE_SIO=ON \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always -Werror "\
Expand Down
25 changes: 10 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,19 @@ repos:
exclude: (doc/ReleaseNotes.md)
- repo: local
hooks:
- id: clang-format
name: clang-format
entry: .github/scripts/clang-format-hook
exclude: (edm4hep/(edm4hep|src)/.*(h|cc)$|EDM4HEPVersion.h)
types: [c++]
language: system
- id: readme-links-check
name: README links check
entry: python ./scripts/updateReadmeLinks.py --check
entry: python3 ./scripts/updateReadmeLinks.py --check
files: (^README.md$)
language: system
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.3
hooks:
- id: ruff
name: ruff
entry: ruff check --force-exclude
types: [python]
language: system
- id: ruff-format
name: ruff-format
entry: ruff format --force-exclude
types: [python]
language: system
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 'v16.0.6'
paulgessinger marked this conversation as resolved.
Show resolved Hide resolved
hooks:
- id: clang-format
types: [c++]
exclude: (edm4hep/(edm4hep|src)/.*(h|cc)$|EDM4HEPVersion.h)
Loading