forked from microsoft/onnxruntime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create clang-tidy CI (microsoft#12653)
Update clang-tidy config to prepare for creating a CI workflow to run clang-tidy. Added clangtidy check in CI Co-authored-by: Edward Chen <[email protected]>
- Loading branch information
1 parent
5f1bc8f
commit 402e199
Showing
2 changed files
with
75 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,60 @@ | ||
--- | ||
# turn off readability-braces-around-statements to allow single line statement like 'if (x == y) doSomething();' | ||
Checks: '-*,cppcoreguidelines-*,google-*,readability-*,modernize-*,-readability-braces-around-statements,-google-runtime-references,-cppcoreguidelines-pro-type-reinterpret-cast' | ||
WarningsAsErrors: '' | ||
|
||
# NOTE: | ||
# The check is a multiline string here. Comment must not be moved into the string. | ||
# Be sure to keep the disabled rules alphabetically sorted. | ||
# | ||
# Checks that are turned off: | ||
# | ||
# -cppcoreguidelines-macro-usage: There are a lot of false-positives like Function-like macro 'Foo' used; consider a 'constexpr' template function | ||
# -cppcoreguidelines-pro-type-reinterpret-cast: Originally turned off. | ||
# -google-readability-todo: Not enforced. | ||
# -google-runtime-references: https://github.com/microsoft/onnxruntime/blob/main/docs/Coding_Conventions_and_Standards.md#c-code-style. | ||
# -modernize-concat-nested-namespaces: We don't use it. | ||
# -modernize-use-trailing-return-type: Stylistic preference we do not enforce. | ||
# -readability-identifier-length: A lot of numerical code rely on short names to improve readability. | ||
# -readability-uppercase-literal-suffix: We accept lowercase suffixes | ||
|
||
Checks: > | ||
-*, | ||
cppcoreguidelines-*, | ||
google-*, | ||
readability-*, | ||
modernize-*, | ||
bugprone-*, | ||
performance-*, | ||
misc-*, | ||
-cppcoreguidelines-macro-usage, | ||
-cppcoreguidelines-pro-type-reinterpret-cast, | ||
-google-readability-todo, | ||
-google-runtime-references, | ||
-modernize-concat-nested-namespaces, | ||
-modernize-use-trailing-return-type, | ||
-readability-identifier-length, | ||
-readability-uppercase-literal-suffix, | ||
WarningsAsErrors: "" | ||
HeaderFilterRegex: '.*onnxruntime\/core\/.*' | ||
AnalyzeTemporaryDtors: false | ||
FormatStyle: none | ||
CheckOptions: | ||
- key: google-readability-braces-around-statements.ShortStatementLines | ||
value: '1' | ||
- key: google-readability-function-size.StatementThreshold | ||
value: '800' | ||
- key: google-readability-namespace-comments.ShortNamespaceLines | ||
value: '10' | ||
- key: google-readability-namespace-comments.SpacesBeforeComments | ||
value: '2' | ||
- key: modernize-loop-convert.MaxCopySize | ||
value: '16' | ||
- key: modernize-loop-convert.MinConfidence | ||
value: reasonable | ||
- key: modernize-loop-convert.NamingStyle | ||
value: CamelCase | ||
- key: modernize-pass-by-value.IncludeStyle | ||
value: google | ||
- key: modernize-replace-auto-ptr.IncludeStyle | ||
value: google | ||
- key: modernize-use-nullptr.NullMacros | ||
value: 'NULL' | ||
... | ||
|
||
FormatStyle: none | ||
CheckOptions: | ||
- key: google-readability-braces-around-statements.ShortStatementLines | ||
value: "1" | ||
- key: google-readability-function-size.StatementThreshold | ||
value: "800" | ||
- key: google-readability-namespace-comments.ShortNamespaceLines | ||
value: "10" | ||
- key: google-readability-namespace-comments.SpacesBeforeComments | ||
value: "2" | ||
- key: modernize-loop-convert.MaxCopySize | ||
value: "16" | ||
- key: modernize-loop-convert.MinConfidence | ||
value: reasonable | ||
- key: modernize-loop-convert.NamingStyle | ||
value: CamelCase | ||
- key: modernize-pass-by-value.IncludeStyle | ||
value: google | ||
- key: modernize-replace-auto-ptr.IncludeStyle | ||
value: google | ||
- key: modernize-use-nullptr.NullMacros | ||
value: "NULL" | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters