You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .clang-tidy
+26-2Lines changed: 26 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,21 @@
1
+
# Reasons
2
+
# -------
3
+
# A list of common reasons why certain specific lines are not linted (see source code)
4
+
#
5
+
# Reason 1
6
+
# This specific struct/define can be found buried under several stdlib/OS-dependent
7
+
# layers of header files, and it triggers the misc-include-cleaner check.
8
+
# The misc-include-cleaner check is useful and we don't want to disable it,
9
+
# but also including the specific header is cumbersome and not portable.
10
+
11
+
12
+
# Checks
13
+
# ------
1
14
# altera-id-dependent-backward-branch: it's ok to have ID-dependent loops, we have plenty of processing power and no safety critical system
2
15
# altera-struct-pack-align: it's just for performance, we don't need to optimize up to this level
3
16
# altera-unroll-loop: it's just for performance, we don't need to optimize up to this level
4
17
# bugprone-easily-swappable-parameters: loud warnings, with no clear advice on how to fix
18
+
# llvm-header-guard: warns when headers do not adhere to LLVM style, but this is not LLVM
5
19
# llvmlibc-restrict-system-libc-headers: this is a desktop application, libc is useful
6
20
# cppcoreguidelines*: this is a C application, not a C++ one
7
21
# readability-magic-numbers.IgnorePowersOf2IntegerValues: it's reasonable that powers of two can be pretty self-explanatory in an emulator
@@ -11,15 +25,19 @@
11
25
# concurrency-mt-unsafe: better to check for errors with strerror() and errno, instead of ignoring because functions are thread unsafe, don't you think?
12
26
# clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling: disabled because everybody needs memset()
13
27
# modernize-macro-to-enum: too much noise for harmless notation
28
+
# readability-avoid-unconditional-preprocessor-if: this is the only proper way to leave some stale, but useful code in the codebase, we can't have clang-tidy prohibit it
29
+
# readability-implicit-bool-conversion: explicit bool/int generates a lot of unnecessary boilerplate which actually impairs readability at this point
14
30
# readability-function-cognitive-complexity: difficult to decide a meaningful threshold, this has been chosen pretty random
15
31
# readability-magic-numbers: this is an emulator, we need magic numbers here and there, otherwise code will get too bloated
32
+
# readability-use-concise-preprocessor-directives: they were expanded because clang-tidy asked us to do so in a previous version, so it better shut up now
0 commit comments