Skip to content

Commit

Permalink
Run clang-format in pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoinePrv authored and tdegeus committed Jan 15, 2023
1 parent d7101d9 commit d608ef7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
11 changes: 11 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ ExperimentalAutoDetectBinPacking: true
EmptyLineAfterAccessModifier: Always
EmptyLineBeforeAccessModifier: Always
IncludeBlocks: Regroup
IncludeCategories:
- Regex: <[^.]+>
Priority: 1
- Regex: <xtensor/.+>
Priority: 3
- Regex: <.+>
Priority: 2
- Regex: '"xtensor/.+"'
Priority: 4
- Regex: '".+"'
Priority: 5
IndentCaseLabels: true
IndentWidth: '4'
IndentWrappedFunctionNames: false
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install micromamba
uses: mamba-org/provision-with-micromamba@v13
with:
environment-file: environment-dev.yml
environment-name: xtensor-dev
cache-downloads: true
- uses: pre-commit/action@v3.0.0
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,9 @@ repos:
hooks:
- id: conda_envfile_parse
files: environment.yaml
# Externally provided executables (so we can use them with editors as well).
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v15.0.6
hooks:
- id: clang-format
files: .*\.[hc]pp$

0 comments on commit d608ef7

Please sign in to comment.