Closed jand271 closed 3 years ago
It also appears I cannot suppress the rule with supresss_rule: "naming_parameters"
in my miss_hit.cfg
I think this is an oversight on my side: ~
should be exempt from name checking. I will fix it.
This is now fixed, thanks again for the report. I will make a special bugfix release just for this issue.
This is my miss_hit.cfg
project_root
suppress_rule: "copyright_notice"
suppress_rule: "naming_classes"
suppress_rule: "naming_functions"
suppress_rule: "naming_scripts"
supresss_rule: "naming_parameters"
line_length: 120
Which yields the following results.
$ mh_style --fix
miss_hit.cfg: error: config file contains errors
In miss_hit.cfg, line 6
| supresss_rule: "naming_parameters"
| ^^^^^^^^^^^^^ error: expected valid style configuration name
.: error: cannot find project root because the config file contains errors: please add a config file with the 'project_root' directive
MISS_HIT Style Summary: 2 file(s) analysed, 3 error(s)
Am I missing something obvious? Why can't I suppress the rule? thanks
Yes :) You have:
supresss_rule: "naming_parameters"
Notice the spelling of suppress
The error message is not mega helpful, but I will try to find a good place in the config parser to improve it.
oof...that's embarrassing lol. Thanks!!
The next version will have an improved error message:
In miss_hit.cfg, line 6
| supresss_rule: "naming_parameters"
| ^^^^^^^^^^^^^ error: expected valid style configuration name (did you mean suppress_rule?)
MISS_HIT Component affected Please choose one from:
Your operating system and Python version
python3 --version
- 3.8Describe the bug A function with an ignored input (e.g., to pass matlab's code checker) yields a style violation. A function parameter
~
should be ok.For instance
mh output