From d8274c98ef19b38f64b282f6763937122b822664 Mon Sep 17 00:00:00 2001 From: Matthew Burket Date: Mon, 8 Jul 2024 08:54:02 -0500 Subject: [PATCH] Address code review comments from #12110 --- docs/manual/developer/05_tools_and_utilities.md | 10 +++++----- utils/find_unused_rules.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/manual/developer/05_tools_and_utilities.md b/docs/manual/developer/05_tools_and_utilities.md index a2512612a254..203f6212df5a 100644 --- a/docs/manual/developer/05_tools_and_utilities.md +++ b/docs/manual/developer/05_tools_and_utilities.md @@ -746,21 +746,21 @@ $ ./utils/ansible_playbook_to_role.py --dry-run output ### `utils/find_unused_rules.py` – List Rules That Are Not Used In Any Datastream -This script will output rules are not in any datastreams. -To prevent false positives the script will not run if the number of build datastreams less than the total number of products in the project. +This script will output rules are not in any data streams. +To prevent false positives the script will not run if the number of build datas treams less than the total number of products in the project. The script assumes that `./build_project --derivatives` will be ran before the script is used. This script does require that `./utils/rule_dir_json.py` be run before this script is used as well. -This script works by comparing rules in the datastreams to the rules in the `rule_dirs.json` file. +This script works by comparing rules in the data streams to the rules in the `rule_dirs.json` file. The script works by adding off the rule ids from the data streams to a `set`. Then the script converts the keys of `rule_dirs.json` to a set. -The set of rules in the data stream is subtraced to from the set of rules in `rule_dirs.json`. +The set of rules in the data stream is subtracted to from the set of rules in `rule_dirs.json`. The differnce is then output to the user. Example useage: ```bash -$ ./build_project --derivatives +$ ./build_products --derivatives $ ./utils/rule_dir_json.py $ ./utils/find_unused_rules.py ``` diff --git a/utils/find_unused_rules.py b/utils/find_unused_rules.py index d16f793a0208..01052ab5cd01 100755 --- a/utils/find_unused_rules.py +++ b/utils/find_unused_rules.py @@ -82,7 +82,7 @@ def main() -> int: if not disuse_rules: print("All rules are used in the datastream files.") return 0 - print("The following rules are not used in ANY of the provided the datastream files:") + print("The following rules are not used in ANY of the provided data stream files:") print("\n".join(disuse_rules)) return 1