aboutsummaryrefslogtreecommitdiff
path: root/.clang-tidy
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-11-30 20:35:25 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-11-30 20:35:25 +0000
commit1b7b916b7631ddf73c38e3a0070d64e4636cb2f3 (patch)
treecd08258054db80bb9a11b1061bb091c70b76926a /.clang-tidy
parenteaa89c11d0f8aefbb512de769c6c82f61a8baca3 (diff)
parent4a8bf24ac690004aedf5540fa440e788459e5e34 (diff)
downloadrneovim-aucmd_textputpost.tar.gz
rneovim-aucmd_textputpost.tar.bz2
rneovim-aucmd_textputpost.zip
Merge remote-tracking branch 'upstream/master' into aucmd_textputpostaucmd_textputpost
Diffstat (limited to '.clang-tidy')
-rw-r--r--.clang-tidy85
1 files changed, 57 insertions, 28 deletions
diff --git a/.clang-tidy b/.clang-tidy
index 1fe87ba501..927909cf8d 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -1,42 +1,71 @@
+WarningsAsErrors: '*,-clang-diagnostic-unused-function'
Checks: >
- -*,
+ Enable all warnings by default. This ensures we don't miss new and useful
+ warnings when a new version of clang-tidy is dropped.
- bugprone-*,
- google-*,
- misc-*,
- modernize-*,
- performance-*,
- portability-*,
- readability-*,
+ IMPORTANT
+ clang-tidy doesn't support comments but we can simulate comments by just
+ writing text directly here. These are then interpreted as warnings and will
+ be dropped. As long as you start every sentence with a capital letter and
+ don't use commas in your "comments" you should be fine,
+ *,
+ Untriaged warnings. Please categorize them accordingly if you find a relevant
+ section for it,
-bugprone-assignment-in-if-condition,
- -bugprone-branch-clone,
- -bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
- -bugprone-macro-parentheses,
- -bugprone-narrowing-conversions,
-bugprone-not-null-terminated-result,
- -bugprone-reserved-identifier,
- -bugprone-sizeof-expression,
- -bugprone-suspicious-include,
-bugprone-suspicious-memory-comparison,
- -bugprone-unused-return-value,
- -google-readability-braces-around-statements,
- -google-readability-function-size,
- -misc-misplaced-const,
- -misc-no-recursion,
+ -bugprone-switch-missing-default-case,
+ -cert-env33-c,
+ -cert-err33-c,
+ -cert-err34-c,
+ -concurrency-mt-unsafe,
+ -cppcoreguidelines-narrowing-conversions,
+
+ Warnings that may be useful, but are too inconsistent to enable by default
+ May yield useful results with some manual triaging,
+ -bugprone-branch-clone,
+ -bugprone-macro-parentheses,
+ -bugprone-sizeof-expression,
+ -hicpp-multiway-paths-covered,
+ -hicpp-signed-bitwise,
-misc-unused-parameters,
-modernize-macro-to-enum,
- -performance-no-int-to-ptr,
- -readability-avoid-const-params-in-decls,
- -readability-braces-around-statements,
-readability-else-after-return,
- -readability-function-cognitive-complexity,
-readability-function-size,
- -readability-identifier-length,
-readability-isolate-declaration,
+
+ Warnings that are rarely useful,
+ -altera-*, Checks related to OpenCL programming for FPGAs. Not relevant,
+ -android-*,
+ -bugprone-easily-swappable-parameters,
+ -bugprone-swapped-arguments,
+ -clang-analyzer-*, Already covered by the cmake target "clang-analyzer",
+ -cppcoreguidelines-avoid-non-const-global-variables,
+ -cppcoreguidelines-init-variables,
+ -llvm-header-guard, We use #pragma once,
+ -llvmlibc-restrict-system-libc-headers, We want to use glibc,
+ -misc-header-include-cycle, Looks useful but redundant with IWYU. We may replace IWYU with this one day,
+ -misc-include-cleaner, Looks useful but redundant with IWYU. We may replace IWYU with this one day,
+ -misc-misplaced-const,
+ -misc-no-recursion,
+ -performance-no-int-to-ptr,
+ -readability-function-cognitive-complexity,
+ -readability-identifier-length,
-readability-magic-numbers,
- -readability-misleading-indentation,
- -readability-redundant-declaration,
- -readability-redundant-function-ptr-dereference,
+ -readability-redundant-declaration, Conflicts with our header generation scripts,
-readability-suspicious-call-argument,
+
+ Aliases. These are just duplicates of other warnings and should always be ignored,
+ -bugprone-narrowing-conversions,
+ -cert-dcl37-c,
+ -cert-dcl51-cpp,
+ -cert-exp42-c,
+ -cert-flp37-c,
+ -cert-msc24-c,
+ -cert-msc33-c,
+ -cppcoreguidelines-avoid-magic-numbers,
+ -google-readability-function-size,
+ -hicpp-function-size,
+ -llvm-else-after-return,