Skip to content

Commit

Permalink
[ot] hw/opentitan: add .clang-tidy configuration files
Browse files Browse the repository at this point in the history
Signed-off-by: Emmanuel Blot <[email protected]>
  • Loading branch information
rivos-eblot committed Nov 27, 2023
1 parent 97bf9e3 commit 83a3a41
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
30 changes: 30 additions & 0 deletions hw/opentitan/.clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
Checks: '*,
-*-avoid-non-const-global-variables,
-*-magic-numbers,
-*-uppercase-literal-suffix,
-altera-*,
-android-cloexec-fopen,
-bugprone-assignment-in-if-condition,
-bugprone-easily-swappable-parameters,
-bugprone-reserved-identifier,
-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
-clang-diagnostic-error,
-clang-diagnostic-unknown-warning-option,
-cert-dcl37-c,-cert-dcl51-cpp,
-concurrency-mt-unsafe,
-cppcoreguidelines-init-variables,
-cppcoreguidelines-interfaces-global-init,
-google-readability-*,
-hicpp-no-assembler,
-hicpp-signed-bitwise,
-llvmlibc-*,
-llvm-include-order,
-modernize-macro-to-enum,
-performance-no-int-to-ptr,
-readability-function-cognitive-complexity,
-readability-identifier-length,
-readability-isolate-declaration'
UseColor: true
WarningsAsErrors: '*'
...
30 changes: 30 additions & 0 deletions hw/riscv/.clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
Checks: '*,
-*-avoid-non-const-global-variables,
-*-magic-numbers,
-*-uppercase-literal-suffix,
-altera-*,
-android-cloexec-fopen,
-bugprone-assignment-in-if-condition,
-bugprone-easily-swappable-parameters,
-bugprone-reserved-identifier,
-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
-clang-diagnostic-error,
-clang-diagnostic-unknown-warning-option,
-cert-dcl37-c,-cert-dcl51-cpp,
-concurrency-mt-unsafe,
-cppcoreguidelines-init-variables,
-cppcoreguidelines-interfaces-global-init,
-google-readability-*,
-hicpp-no-assembler,
-hicpp-signed-bitwise,
-llvmlibc-*,
-llvm-include-order,
-modernize-macro-to-enum,
-performance-no-int-to-ptr,
-readability-function-cognitive-complexity,
-readability-identifier-length,
-readability-isolate-declaration'
UseColor: true
WarningsAsErrors: '*'
...

0 comments on commit 83a3a41

Please sign in to comment.