universalmutator
universalmutator copied to clipboard
`--only` not working
I've tried to use --only
(universalmutator 1.1.11) but it does not work.
*** UNIVERSALMUTATOR ***
MUTATING WITH RULES: rust.rules
8 MUTANTS GENERATED BY RULES
Traceback (most recent call last):
File "/opt/homebrew/bin/mutate", line 8, in <module>
sys.exit(main())
^^^^^^
File "/opt/homebrew/lib/python3.12/site-packages/universalmutator/genmutants.py", line 415, in main
handler = handlers[language].handler
~~~~~~~~^^^^^^^^^^
KeyError: '--only'
I do believe the error is into:
if len(args) < 3:
try:
language = languages[ending]
except KeyError:
language = "none"
otherRules = []
else:
if ".rules" in args[2]:
language = languages[ending]
otherRules = args[2:]
else:
language = args[2]
otherRules = args[3:]
If the command is, e.g., mutate mycode.rs --only rust.rules --mutantDir mutants
. The .rules
is the third element in args not the second one.