|
4 | 4 | # env) — see lib/mix/tasks/clang.tidy.ex and the `clang-tidy` target in |
5 | 5 | # the Makefile. |
6 | 6 | # |
7 | | -# A focused, high-signal starting set: bug patterns, the clang static |
8 | | -# analyzer (clang-analyzer-*), and performance checks. Deliberately not |
9 | | -# the modernize/readability/cppcoreguidelines firehose yet — broaden once |
10 | | -# this baseline is green. `bugprone-easily-swappable-parameters` is off |
11 | | -# because it fires on nearly every NIF entry point (many same-typed args) |
12 | | -# without pointing at a real defect. |
| 7 | +# A focused, high-signal set: bug patterns, the clang static analyzer |
| 8 | +# (clang-analyzer-*), and performance checks. Deliberately not the |
| 9 | +# modernize/readability/cppcoreguidelines firehose yet — broaden once this |
| 10 | +# baseline stays green. |
| 11 | +# |
| 12 | +# Disabled checks and why: |
| 13 | +# * bugprone-easily-swappable-parameters — fires on nearly every NIF |
| 14 | +# entry point (many same-typed args) without pointing at a real defect. |
| 15 | +# * performance-unnecessary-value-param — every NIF takes its |
| 16 | +# fine::ResourcePtr args by value because Fine's FINE_NIF macro decodes |
| 17 | +# each BEAM term into a value and passes it in; the signature is the |
| 18 | +# binding convention, not a stray copy (the cppcheck build suppresses |
| 19 | +# the same thing as passedByValueCallback). |
| 20 | +# * bugprone-throwing-static-initialization — FINE_NIF / FINE_RESOURCE |
| 21 | +# register callbacks at static-init time via throwing constructors; |
| 22 | +# this is inherent to Fine's registration model, across ~25 macro |
| 23 | +# expansions we don't own. |
| 24 | +# * performance-enum-size — Opcode and ref::Kind are int64_t on purpose |
| 25 | +# (they pack into the int64 refs the Elixir lowerer emits); shrinking |
| 26 | +# the base type would break that ABI. |
13 | 27 | # |
14 | 28 | # HeaderFilterRegex scopes diagnostics to our own headers; MLX and Fine |
15 | 29 | # arrive via -isystem and are skipped, exactly as the compiler skips them. |
16 | | -Checks: '-*,bugprone-*,clang-analyzer-*,performance-*,-bugprone-easily-swappable-parameters' |
| 30 | +Checks: '-*,bugprone-*,clang-analyzer-*,performance-*,-bugprone-easily-swappable-parameters,-performance-unnecessary-value-param,-bugprone-throwing-static-initialization,-performance-enum-size' |
17 | 31 | WarningsAsErrors: '*' |
18 | 32 | HeaderFilterRegex: 'c_src/' |
19 | 33 | FormatStyle: none |
0 commit comments