Skip to content

Commit

Permalink
Add cmake-format
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoinePrv committed Nov 7, 2023
1 parent 2b948ce commit b6ef7b7
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 25 deletions.
32 changes: 32 additions & 0 deletions .cmake-format.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"encode": {
"emit_byteorder_mark": false,
"input_encoding": "utf-8",
"output_encoding": "utf-8"
},
"format": {
"always_wrap": [],
"autosort": false,
"command_case": "lower",
"dangle_align": "prefix",
"dangle_parens": true,
"enable_sort": true,
"keyword_case": "upper",
"layout_passes": {},
"line_ending": "unix",
"line_width": 100,
"max_lines_hwrap": 0,
"max_pargs_hwrap": 6,
"max_prefix_chars": 0,
"max_rows_cmdline": 1,
"max_subgroups_hwrap": 2,
"min_prefix_chars": 0,
"require_valid_layout": false,
"separate_ctrl_name_with_space": false,
"separate_fn_name_with_space": false,
"tab_size": 4
},
"misc": {
"per_command": {}
}
}
54 changes: 29 additions & 25 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,49 +1,53 @@
exclude: libmamba/tests/data/repodata_json_cache*
repos:
- repo: https://github.com/psf/black
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
- id: black
args: [--safe, --quiet]
- repo: https://github.com/asottile/blacken-docs
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
- id: blacken-docs
additional_dependencies: [black==22.3.0]
- repo: https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: fix-encoding-pragma
- id: trailing-whitespace
- id: end-of-file-fixer
- id: fix-encoding-pragma
args: [--remove]
- id: check-yaml
- id: check-yaml
exclude: ^.+(/tests/|/recipe/).+$
- id: check-toml
- id: check-json
- id: check-merge-conflict
- id: pretty-format-json
- id: check-toml
- id: check-json
- id: check-merge-conflict
- id: pretty-format-json
args: [--autofix]
- id: debug-statements
- id: debug-statements
language_version: python3
- repo: https://github.com/pre-commit/mirrors-isort
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
exclude: tests/data
- repo: https://github.com/PyCQA/flake8
- id: isort
exclude: tests/data
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
- id: flake8
language_version: python3
additional_dependencies:
- flake8-typing-imports==1.15.0
- flake8-builtins==2.1.0
- flake8-bugbear==23.9.16
- flake8-isort==6.1.0
- repo: https://github.com/pre-commit/mirrors-clang-format
- flake8-typing-imports==1.15.0
- flake8-builtins==2.1.0
- flake8-bugbear==23.9.16
- flake8-isort==6.1.0
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.6
hooks:
- id: clang-format
- id: clang-format
args: [--style=file]
exclude: ".json"
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
1 change: 1 addition & 0 deletions dev/environment-dev-extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- clang
- clangxx
- lld
- cmake-format
# C++ Debugging
- gdb
- valgrind
Expand Down

0 comments on commit b6ef7b7

Please sign in to comment.