]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Whitelist clang-tidy warning cppcoreguidelines-pro-type-const-cast
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 27 Apr 2020 16:23:56 +0000 (18:23 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 27 Apr 2020 16:23:56 +0000 (18:23 +0200)
We’re using const_cast for the argument argv to execve(2) which doesn’t
modify the argument.

src/.clang-tidy

index e95512169178d0018da3937e18c0f1612a2945d7..b6dccee3a59e691e901b51ba00409d9008a74697 100644 (file)
@@ -3,8 +3,9 @@
 # (Without claiming that they are 100% correct. They can be modified on demand!)
 # If you want to improve the codebase try enabling some additional checks or
 # playing with the configuration values.
-# Some checks are highly style dependent. The goal is NOT to activate all
-# of them.
+#
+# Some checks are highly style dependent. The goal is NOT to activate all of
+# them.
 
 ---
 Checks:          '-*,
@@ -44,6 +45,7 @@ Checks:          '-*,
                   -cppcoreguidelines-avoid-goto,
                   -cppcoreguidelines-pro-type-member-init,
                   -cppcoreguidelines-macro-usage,
+                  -cppcoreguidelines-pro-type-const-cast,
                   -cppcoreguidelines-pro-type-reinterpret-cast,
                   -cppcoreguidelines-pro-type-union-access,
                   -cppcoreguidelines-narrowing-conversions,
@@ -63,7 +65,7 @@ Checks:          '-*,
 WarningsAsErrors: '*'
 # Exclude subdirectories (currently there is only third_party)
 HeaderFilterRegex: 'src/[^\\/]*^'
-CheckOptions:    
+CheckOptions:
   # Always add braces (added here just in case clang-tidy default changes).
   - key:             readability-braces-around-statements.ShortStatementLines
     value:           0