summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/add_new_check.py
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/add_new_check.py')
-rwxr-xr-xclang-tools-extra/clang-tidy/add_new_check.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/add_new_check.py b/clang-tools-extra/clang-tidy/add_new_check.py
index f38e59bbdd9..ab0c883db66 100755
--- a/clang-tools-extra/clang-tidy/add_new_check.py
+++ b/clang-tools-extra/clang-tidy/add_new_check.py
@@ -320,9 +320,11 @@ def main():
metavar='LANG')
parser.add_argument(
'module',
+ nargs='?',
help='module directory under which to place the new tidy check (e.g., misc)')
parser.add_argument(
'check',
+ nargs='?',
help='name of new tidy check to add (e.g. foo-do-the-stuff)')
args = parser.parse_args()
@@ -330,6 +332,11 @@ def main():
update_checks_list(os.path.dirname(sys.argv[0]))
return
+ if not args.module or not args.check:
+ print 'Module and check must be specified.'
+ parser.print_usage()
+ return
+
module = args.module
check_name = args.check
OpenPOWER on IntegriCloud