Skip to content

Commit 1596c2d

Browse files
Joachim Priesnerabpostelnicu
authored andcommitted
Fix -allow-enabling-analyzer-alpha-checkers always being passed to run-clang-tidy.py
The action='store_true' option of argparse.add_argument implicitly generates a default value of False if the argument is not specified. Thus, the allow_enabling_alpha_checkers argument of get_tidy_invocation is never None.
1 parent d3f1f58 commit 1596c2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang-tools-extra/clang-tidy/tool/run-clang-tidy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def get_tidy_invocation(f, clang_tidy_binary, checks, tmpdir, build_path,
8484
extra_arg, extra_arg_before, quiet, config):
8585
"""Gets a command line for clang-tidy."""
8686
start = [clang_tidy_binary]
87-
if allow_enabling_alpha_checkers is not None:
87+
if allow_enabling_alpha_checkers:
8888
start.append('-allow-enabling-analyzer-alpha-checkers')
8989
if header_filter is not None:
9090
start.append('-header-filter=' + header_filter)

0 commit comments

Comments
 (0)