scripts/clang-tools: Convert clang-tidy args to list

Convert list of clang-tidy arguments to a list for ease of adding to
them and extending them as required.

Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

authored by Guru Das Srinagesh and committed by Masahiro Yamada 04518e4c 11df33c3

+6 -5
+6 -5
scripts/clang-tools/run-clang-tools.py
··· 45 45 46 46 def run_analysis(entry): 47 47 # Disable all checks, then re-enable the ones we want 48 - checks = "-checks=-*," 48 + checks = [] 49 + checks.append("-checks=-*") 49 50 if args.type == "clang-tidy": 50 - checks += "linuxkernel-*" 51 + checks.append("linuxkernel-*") 51 52 else: 52 - checks += "clang-analyzer-*" 53 - checks += ",-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling" 54 - p = subprocess.run(["clang-tidy", "-p", args.path, checks, entry["file"]], 53 + checks.append("clang-analyzer-*") 54 + checks.append("-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling") 55 + p = subprocess.run(["clang-tidy", "-p", args.path, ",".join(checks), entry["file"]], 55 56 stdout=subprocess.PIPE, 56 57 stderr=subprocess.STDOUT, 57 58 cwd=entry["directory"])