This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] run-clang-tidy.py: Fix -allow-enabling-analyzer-alpha-checkers always being passed
ClosedPublic

Authored by jspam on Aug 19 2020, 6:05 AM.

Details

Summary

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.

Fixes: bbb7921da97ce03d2933e185a525c4e452b146b0

[1] https://docs.python.org/3/library/argparse.html

Diff Detail

Event Timeline

jspam created this revision.Aug 19 2020, 6:05 AM
jspam requested review of this revision.Aug 19 2020, 6:05 AM
Eugene.Zelenko added a project: Restricted Project.
aaron.ballman accepted this revision.Aug 20 2020, 5:15 AM

LGTM! Do you need someone to commit on your behalf? If so, please be sure you're fine with the license agreement and let us know what name and email address you would like associated with the commit. Thanks!

This revision is now accepted and ready to land.Aug 20 2020, 5:15 AM
jspam added a comment.Aug 20 2020, 6:05 AM

Yes please. I am fine with the license agreement, and please use Joachim Priesner <llvm-project-704996@jspam.de> as the commit author. Thanks!

aaron.ballman closed this revision.Aug 20 2020, 6:16 AM

I've commit on your behalf as 03ded5497a2f458b6af054fa7bac0da0240e7b7a, thank you for the patch!