diff options
author | Jade Lovelace <lix@jade.fyi> | 2024-03-29 20:26:38 -0700 |
---|---|---|
committer | Jade Lovelace <lix@jade.fyi> | 2024-03-29 20:26:38 -0700 |
commit | 99f159c5367e423097fe4347375bdfc4f76d2c0c (patch) | |
tree | 2d17991883b10cc49dcab38595122ffaa0b9c464 | |
parent | 5a54b0a20c80356de5098694353f506e73fb883f (diff) |
Add basic clang-tidy config
This has not yet had all the warnings Obliterated, but it is a start and
is not *super* far away from being able to run the current configuration
in CI, which will catch some limited number of mistakes.
I tried the meson clang-tidy target and it seems to fail to find flags
for several files, which seems broken. Unsure what is up with that, but
we can use run-clang-tidy or other tooling instead.
We have an extremely annoying situation with the lexer table, which
means that the lexer probably must be moved to another directory with
its own .clang-tidy file to disable the lints in it, *or* write scuffed
code that prepends a disable comment to the top of the generated file.
None of the comment-based lint disabling features work since yacc dumps
a bunch of non compliant code at the top of the file before anything the
user can control.
Change-Id: I1d2aa6ec32deb1db1fbd581127334db1b972323c
-rw-r--r-- | .clang-tidy | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 000000000..3b5dcd91a --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,18 @@ +UseColor: true +Checks: + - -* + - bugprone-* + # too many warnings + - -bugprone-assignment-in-if-condition + # too many warnings + - -bugprone-narrowing-conversions + # kind of nonsense + - -bugprone-easily-swappable-parameters + # too many warnings for now + - -bugprone-implicit-widening-of-multiplication-result + # Lix's exception handling is Questionable + - -bugprone-empty-catch + # many warnings + - -bugprone-unchecked-optional-access + # many warnings, seems like a questionable lint + - -bugprone-branch-clone |