Add --only-todo
This commit is contained in:
parent
7d553e5a8e
commit
a4dd2a3b9f
|
@ -42,6 +42,7 @@ class Config:
|
||||||
with_display_name: bool
|
with_display_name: bool
|
||||||
only_for_javadoc: bool
|
only_for_javadoc: bool
|
||||||
only_for_display_name: bool
|
only_for_display_name: bool
|
||||||
|
only_for_todo: bool
|
||||||
naming_scheme: NamingScheme
|
naming_scheme: NamingScheme
|
||||||
|
|
||||||
|
|
||||||
|
@ -198,6 +199,8 @@ def replace_test_pattern(
|
||||||
return match.group(0)
|
return match.group(0)
|
||||||
if config.only_for_display_name and not displayname:
|
if config.only_for_display_name and not displayname:
|
||||||
return match.group(0)
|
return match.group(0)
|
||||||
|
if config.only_for_todo and 'todo' not in name.lower():
|
||||||
|
return match.group(0)
|
||||||
|
|
||||||
# Formatting
|
# Formatting
|
||||||
description = displayname or javadoc or from_camel_case(name)
|
description = displayname or javadoc or from_camel_case(name)
|
||||||
|
|
|
@ -56,7 +56,12 @@ def argument_parser():
|
||||||
argparser.add_argument(
|
argparser.add_argument(
|
||||||
'--only-displayname',
|
'--only-displayname',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help='Only change test with an existing DisplayName',
|
help='Only change tests with an existing DisplayName',
|
||||||
|
)
|
||||||
|
argparser.add_argument(
|
||||||
|
'--only-todo',
|
||||||
|
action='store_true',
|
||||||
|
help='Only change tests where the test name contains the word "todo"',
|
||||||
)
|
)
|
||||||
argparser.add_argument(
|
argparser.add_argument(
|
||||||
'--naming',
|
'--naming',
|
||||||
|
@ -77,6 +82,7 @@ def main():
|
||||||
with_display_name=args.displayname,
|
with_display_name=args.displayname,
|
||||||
only_for_javadoc=args.only_javadoc,
|
only_for_javadoc=args.only_javadoc,
|
||||||
only_for_display_name=args.only_displayname,
|
only_for_display_name=args.only_displayname,
|
||||||
|
only_for_todo=args.only_todo,
|
||||||
naming_scheme=args.naming,
|
naming_scheme=args.naming,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user