Lines Matching +full:stdout +full:- +full:path
2 # SPDX-License-Identifier: GPL-2.0
8 """A helper routine run clang-tidy and the clang static-analyzer on
20 """Set up and parses command-line arguments.
23 Has keys: [path, type]
25 usage = """Run clang-tidy or the clang static-analyzer on a
31 choices=["clang-tidy", "clang-analyzer"],
33 path_help = "Path to the compilation database to parse"
34 parser.add_argument("path", type=str, help=path_help)
47 # Disable all checks, then re-enable the ones we want
49 checks.append("-checks=-*")
50 if args.type == "clang-tidy":
51 checks.append("linuxkernel-*")
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"]],
56 stdout=subprocess.PIPE,
57 stderr=subprocess.STDOUT,
60 sys.stderr.buffer.write(p.stdout)
70 with open(args.path, "r") as f:
77 os.dup2(devnull, sys.stdout.fileno())