Open ericwb opened 1 month ago
Can load all the rule ID names up front in the CLI main
all_rules = [
rule.name
for lang in ("go", "java", "python")
for rule in metadata.entry_points(group=f"precli.rules.{lang}")
]
However, a category name can also be given as the argument, therefore, we need to load the rule to discover all the valid category options.
It may be equally useful to be able to specify a wide range without having to know the number of the largest indexed rule ID. Helps to future proof code and CLI usage in a way.
Describe the bug The enable and disable argument of the CLI allows someone to filter what rules are enabled.
To Reproduce
Expected behavior In this example, JAV999 doesn't exist. The CLI really should vet the parameters given.
Version
Additional context n/a