diff --git a/.clang-format b/.clang-format index 1cfae00..333f858 100644 --- a/.clang-format +++ b/.clang-format @@ -5,6 +5,7 @@ Language: Cpp DerivePointerAlignment: false PointerAlignment: Left AccessModifierOffset: -4 +AlignAfterOpenBracket: BlockIndent # closing brace on new line AlignConsecutiveAssignments: false AlignEscapedNewlines: DontAlign AllowShortBlocksOnASingleLine: false @@ -13,18 +14,10 @@ AllowShortFunctionsOnASingleLine: false AllowShortIfStatementsOnASingleLine: false AllowShortLoopsOnASingleLine: false AlwaysBreakTemplateDeclarations: Yes -PenaltyBreakBeforeFirstCallParameter: 0 +PenaltyBreakBeforeFirstCallParameter: 1 PenaltyReturnTypeOnItsOwnLine: 100 PointerBindsToType: true BreakBeforeBraces: Stroustrup -RemoveSemicolon: true -InsertNewlineAtEOF: true - -# closing brace on new line -AlignAfterOpenBracket: BlockIndent - -# https://stackoverflow.com/questions/74977150/make-clang-format-break-after-the-usage-of-c-attributes -BreakAfterAttributes: Always # Do not align consecutive comments that follow a line of code AlignTrailingComments: false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ce44f31..2425f42 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -8,19 +8,19 @@ repos: - id: check-toml - id: debug-statements - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks - rev: v2.10.0 + rev: v2.11.0 hooks: - id: pretty-format-yaml args: [--preserve-quotes, --autofix, --indent, '2'] - id: pretty-format-toml args: [--autofix] - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 23.11.0 hooks: - id: black args: [--safe, --quiet, --line-length=100] -- repo: https://github.com/humitos/mirrors-autoflake.git - rev: v1.1 +- repo: https://github.com/PyCQA/autoflake + rev: v2.2.1 hooks: - id: autoflake args: [--in-place, --remove-unused-variable, --remove-all-unused-imports] @@ -29,7 +29,7 @@ repos: hooks: - id: reorder-python-imports - repo: https://github.com/asottile/pyupgrade - rev: v3.14.0 + rev: v3.15.0 hooks: - id: pyupgrade args: [--py36-plus] @@ -43,11 +43,11 @@ repos: hooks: - id: setup-cfg-fmt - repo: https://github.com/tdegeus/cpp_comment_format - rev: v0.2.0 + rev: v0.2.1 hooks: - id: cpp_comment_format - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v16.0.6 + rev: v17.0.6 hooks: - id: clang-format args: [-i]