.clang-tidy 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. WarningsAsErrors: '*,-clang-diagnostic-unused-function'
  2. Checks: >
  3. Enable all warnings by default. This ensures we don't miss new and useful
  4. warnings when a new version of clang-tidy is dropped.
  5. IMPORTANT
  6. clang-tidy doesn't support comments but we can simulate comments by just
  7. writing text directly here. These are then interpreted as warnings and will
  8. be dropped. As long as you start every sentence with a capital letter and
  9. don't use commas in your "comments" you should be fine,
  10. *,
  11. Untriaged warnings. Please categorize them accordingly if you find a relevant
  12. section for it,
  13. -bugprone-assignment-in-if-condition,
  14. -bugprone-implicit-widening-of-multiplication-result,
  15. -bugprone-multi-level-implicit-pointer-conversion,
  16. -bugprone-not-null-terminated-result,
  17. -bugprone-suspicious-memory-comparison,
  18. -bugprone-switch-missing-default-case,
  19. -cert-env33-c,
  20. -cert-err33-c,
  21. -cert-err34-c,
  22. -concurrency-mt-unsafe,
  23. -cppcoreguidelines-narrowing-conversions,
  24. Warnings that may be useful, but are too inconsistent to enable by default
  25. May yield useful results with some manual triaging,
  26. -bugprone-branch-clone,
  27. -bugprone-macro-parentheses,
  28. -bugprone-sizeof-expression,
  29. -hicpp-multiway-paths-covered,
  30. -hicpp-signed-bitwise,
  31. -misc-unused-parameters,
  32. -modernize-macro-to-enum,
  33. -readability-avoid-nested-conditional-operator,
  34. -readability-else-after-return,
  35. -readability-enum-initial-value,
  36. -readability-function-size,
  37. -readability-isolate-declaration,
  38. Warnings that are rarely useful,
  39. -altera-*, Checks related to OpenCL programming for FPGAs. Not relevant,
  40. -android-*,
  41. -bugprone-easily-swappable-parameters,
  42. -bugprone-inc-dec-in-conditions,
  43. -bugprone-swapped-arguments,
  44. -clang-analyzer-*, Already covered by the cmake target "clang-analyzer",
  45. -cppcoreguidelines-avoid-non-const-global-variables,
  46. -cppcoreguidelines-init-variables,
  47. -llvm-header-guard, We use #pragma once,
  48. -llvmlibc-restrict-system-libc-headers, We want to use glibc,
  49. -misc-include-cleaner, Looks useful but redundant with IWYU. We may replace IWYU with this one day,
  50. -misc-misplaced-const,
  51. -misc-no-recursion,
  52. -performance-no-int-to-ptr,
  53. -readability-function-cognitive-complexity,
  54. -readability-identifier-length,
  55. -readability-magic-numbers,
  56. -readability-math-missing-parentheses,
  57. -readability-redundant-declaration, Conflicts with our header generation scripts,
  58. -readability-suspicious-call-argument,
  59. Aliases. These are just duplicates of other warnings and should always be ignored,
  60. -bugprone-narrowing-conversions,
  61. -cert-dcl37-c,
  62. -cert-dcl51-cpp,
  63. -cert-exp42-c,
  64. -cert-flp37-c,
  65. -cert-int09-c,
  66. -cert-msc24-c,
  67. -cert-msc33-c,
  68. -cppcoreguidelines-avoid-magic-numbers,
  69. -cppcoreguidelines-macro-to-enum,
  70. -google-readability-braces-around-statements,
  71. -google-readability-function-size,
  72. -hicpp-braces-around-statements,
  73. -hicpp-function-size,
  74. -llvm-else-after-return,