Skip to content

Commit bda9d6e

Browse files
committed
add option to print control updates
Signed-off-by: Sophia Wang <huiwang@redhat.com>
1 parent 9006a8a commit bda9d6e

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Both options have common optional arguments:
5252
Output from the tool.
5353
--profile Print only profile tests.
5454
--rule Print only rule tests.
55+
--control Print the updates of control files.
5556
```
5657

5758
### Remote vs local analysis

content_test_filtering.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
if options.output == "json":
6565
logs.print_json(list_of_tests)
6666
logger.debug(f"The updated controls: {controls_files}")
67-
if controls_files:
67+
if controls_files and options.control_output:
6868
controls_updates = [{"controls": controls_files}]
6969
logs.print_json(controls_updates)
7070
else:

ctf/cli.py

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ def parse_args():
3737
action="store_true", help="Print only profile tests.")
3838
common_parser.add_argument("--rule", dest="rule_output", default=False,
3939
action="store_true", help="Print only rule tests.")
40+
common_parser.add_argument("--control", dest="control_output", default=False,
41+
action="store_true", help="Print control updates.")
4042

4143
parser.set_defaults(pr_number=None, branch=None)
4244

0 commit comments

Comments
 (0)