freepdfeditor/.clang-tidy

47 lines
1.5 KiB
YAML

# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2025 ai-ad4 and the FreePDFEditor contributors
# clang-tidy checks committed to the repo (§13.2 rule 7). Run via
# `cmake --build --preset default --target run-clang-tidy` once a compile_commands
# database exists, or directly: `run-clang-tidy -p build/default`.
Checks: >
-*,
bugprone-*,
cert-*,
clang-analyzer-*,
cppcoreguidelines-*,
cppcoreguidelines-pro-bounds-array-to-pointer-decay,
cppcoreguidelines-pro-bounds-pointer-arithmetic,
google-*,
hicpp-*,
misc-*,
modernize-*,
performance-*,
portability-*,
readability-*,
-bugprone-easily-swappable-parameters,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-non-private-member-variables-in-classes,
-hicpp-no-array-decay,
-modernize-use-trailing-return-type,
-readability-magic-numbers,
-readability-identifier-length
# Banned in the parsing layers per §7.2: raw pointer arithmetic over input.
# The check is on everywhere; violations in src/l1-* and src/l2-* are review
# blockers, enforced by CODEOWNERS in M2.
WarningsAsErrors: ''
HeaderFilterRegex: '.*/src/.*|.*\\[spike/.*'
CheckOptions:
- key: readability-function-cognitive-complexity.Threshold
value: '40'
- key: modernize-use-override.IgnoreDestructors
value: 'true'
- key: cppcoreguidelines-pro-bounds-constant-array-index.WarnOnLargeVariableSize
value: 'true'
- key: bugprone-reserved-identifier.Invert
value: 'false'
UseColor: true