ray/.clang-tidy
mwtian 26fd10c9e8
[CI] Add clang-tidy to lint (#18124)
* clang-tidy

* fix

* fix script

* test clang compiler

* fix clang-tidy rules

* Fix windows and other issues.

* Fix

* Improve information when running check-git-clang-tidy-output.sh on different OS
2021-09-09 00:41:53 -07:00

34 lines
1.3 KiB
YAML

# Disable the following checks due to frequent false positives, noisiness,
# inconsistent style with existing codebase and other reasons:
# -misc-non-private-member-variables-in-classes (potentially too restrictive)
# -misc-unused-parameters (can be cleaned up in batch and enabled)
# -modernize-avoid-c-arrays (too restrictive)
# -modernize-pass-by-value (too restrictive)
# -modernize-return-braced-init-list (inconsistent style)
# -modernize-use-emplace (more subtle behavior)
# -modernize-use-trailing-return-type (inconsistent style)
#
# TODO: enable google-* and readability-* families of checks.
Checks: >
abseil-*,
bugprone-*,
misc-*,
-misc-non-private-member-variables-in-classes,
-misc-unused-parameters,
modernize-*,
-modernize-avoid-c-arrays,
-modernize-pass-by-value,
-modernize-return-braced-init-list,
-modernize-use-emplace,
-modernize-use-trailing-return-type,
performance-*,
CheckOptions:
# Reduce noisiness of the bugprone-narrowing-conversions check.
- key: bugprone-narrowing-conversions.IgnoreConversionFromTypes
value: 'size_t;ptrdiff_t;size_type;difference_type'
- key: bugprone-narrowing-conversions.WarnOnEquivalentBitWidth
value: 'false'
# Turn all the warnings from the checks above into errors.
WarningsAsErrors: "*"