Skip to content

Commit ac52553

Browse files
test-my-pr, mark --c-only and --cpp-only mutually exclusive (#4628)
It makes no sense to specify both arguments at the same time.
1 parent 3f88744 commit ac52553

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

tools/test-my-pr.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@ def format_float(a, b=1):
2525

2626
parser = argparse.ArgumentParser(description='Run this script from your branch with proposed Cppcheck patch to verify your patch against current main. It will compare output of testing bunch of opensource packages')
2727
parser.add_argument('-j', default=1, type=int, help='Concurency execution threads')
28-
group = parser.add_mutually_exclusive_group()
29-
group.add_argument('-p', default=256, type=int, help='Count of packages to check')
30-
group.add_argument('--packages', nargs='+', help='Check specific packages and then stop.')
28+
package_group = parser.add_mutually_exclusive_group()
29+
package_group.add_argument('-p', default=256, type=int, help='Count of packages to check')
30+
package_group.add_argument('--packages', nargs='+', help='Check specific packages and then stop.')
3131
parser.add_argument('-o', default='my_check_diff.log', help='Filename of result inside a working path dir')
32-
parser.add_argument('--c-only', dest='c_only', help='Only process c packages', action='store_true')
33-
parser.add_argument('--cpp-only', dest='cpp_only', help='Only process c++ packages', action='store_true')
32+
33+
language_group = parser.add_mutually_exclusive_group()
34+
language_group.add_argument('--c-only', dest='c_only', help='Only process c packages', action='store_true')
35+
language_group.add_argument('--cpp-only', dest='cpp_only', help='Only process c++ packages', action='store_true')
3436
parser.add_argument('--work-path', '--work-path=', default=__work_path, type=str, help='Working directory for reference repo')
3537
args = parser.parse_args()
3638

0 commit comments

Comments
 (0)