Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
24 changes: 12 additions & 12 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
BasedOnStyle: Google
AccessModifierOffset: -1
AlignEscapedNewlinesLeft: true
Expand All @@ -14,7 +15,7 @@ BreakBeforeBraces: Linux
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
ColumnLimit: 0
CommentPragmas: '^ IWYU pragma:'
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Expand All @@ -23,10 +24,10 @@ DerivePointerBinding: false
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
IndentFunctionDeclarationAfterType: true
IndentWidth: 2
IndentWidth: 2
# It is broken on windows. Breaks all #include "header.h"
---
Language: Cpp
Language: Cpp
MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: true
NamespaceIndentation: None
Expand All @@ -43,19 +44,18 @@ SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
Standard: Cpp11
TabWidth: 2
UseTab: Never
Standard: Cpp11
TabWidth: 2
UseTab: Never
---
# Do not format protobuf files
Language: Proto
DisableFormat: true
# ---
# # Since clang-format 13.0.0
# Language: Json
# # O2 dumps JSON files with 4-space indents.
# IndentWidth: 4
---
Language: Json
# O2 dumps JSON files with 4-space indents.
IndentWidth: 4
17 changes: 10 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,52 @@

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-builtin-literals
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-json
- id: check-toml
- id: check-yaml
args: [--allow-multiple-documents]
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: name-tests-test
- id: pretty-format-json
args: [--autofix, --no-ensure-ascii, --indent, "4"]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.10 # ruff version
rev: v0.12.12 # ruff version
hooks:
- id: ruff # linter
args: ["--fix"]
- id: ruff-format # formatter
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
rev: v3.20.0
hooks:
- id: pyupgrade
args: ["--py310-plus"]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
rev: v0.11.0.1
hooks:
- id: shellcheck
- repo: https://github.com/google/yamlfmt
rev: v0.16.0
rev: v0.17.2
hooks:
- id: yamlfmt
- repo: https://github.com/adrienverge/yamllint
rev: v1.37.1
hooks:
- id: yamllint
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v20.1.4 # clang-format version
rev: v21.1.0 # clang-format version
hooks:
- id: clang-format
- repo: https://github.com/cpplint/cpplint
Expand Down
Loading