public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] scripts/clang-tools: Create array of checks to exclude
@ 2022-10-06  3:23 Guru Das Srinagesh
  2022-10-06  3:24 ` [PATCH 2/2] scripts/clang-tools: Remove core.uninitialized.Assign check Guru Das Srinagesh
  2022-10-10 17:16 ` [PATCH 1/2] scripts/clang-tools: Create array of checks to exclude Nick Desaulniers
  0 siblings, 2 replies; 5+ messages in thread
From: Guru Das Srinagesh @ 2022-10-06  3:23 UTC (permalink / raw)
  To: Nathan Chancellor, Nick Desaulniers, Tom Rix
  Cc: Elliot Berman, llvm, linux-kernel, Guru Das Srinagesh

Create array of clang-analyzer checks to exclude for ease of adding
more. This is per the suggestion in an earlier discussion [1].

[1] https://lore.kernel.org/lkml/CAKwvOdnbMs-pLRfo4O-MHOF=9=kAvDuktkeeeX7bkmnLi8LWnw@mail.gmail.com/

Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
---
 scripts/clang-tools/run-clang-tools.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/clang-tools/run-clang-tools.py b/scripts/clang-tools/run-clang-tools.py
index bb78c9b..a72c4c7 100755
--- a/scripts/clang-tools/run-clang-tools.py
+++ b/scripts/clang-tools/run-clang-tools.py
@@ -50,7 +50,12 @@ def run_analysis(entry):
         checks += "linuxkernel-*"
     else:
         checks += "clang-analyzer-*"
-        checks += ",-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling"
+
+        # List of checks to be excluded
+        exclude = []
+        exclude.append("-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling")
+
+        checks += ''.join(["," + e for e in exclude])
     p = subprocess.run(["clang-tidy", "-p", args.path, checks, entry["file"]],
                        stdout=subprocess.PIPE,
                        stderr=subprocess.STDOUT,
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-10 17:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-06  3:23 [PATCH 1/2] scripts/clang-tools: Create array of checks to exclude Guru Das Srinagesh
2022-10-06  3:24 ` [PATCH 2/2] scripts/clang-tools: Remove core.uninitialized.Assign check Guru Das Srinagesh
2022-10-10 17:22   ` Nick Desaulniers
2022-10-10 17:29     ` Guru Das Srinagesh
2022-10-10 17:16 ` [PATCH 1/2] scripts/clang-tools: Create array of checks to exclude Nick Desaulniers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox