Closed syeopite closed 2 months ago
That's a bug. Thanks for reporting.
Hello, if you don't mind me asking, can I inquire about the status of this bug? I saw that #398 was closed back in January.
@syeopite Hey, sorry for the delayed response. So, it looks like that behavior was intentional because --only
option allows testing specific rules regardless of the config. Even the generated comment in the config (2nd row) says that it is possible to test the rule without changing the config:
# Problems found: 4
# Run `ameba --only Lint/Typos` for details
Lint/Typos:
Description: Reports typos found in source files
FailOnError: false
Excluded:
- spec/ameba/rule/lint/typos_spec.cr
Enabled: true
Severity: Warning
In #398 I was thinking about changing to comment to something like Remove the section below and run
but not sure if that is really convenient. So I would prefer leaving it as is.
@Sija do you have any suggestions here?
I could see an enhancement in a way of marking issues from excluded paths.
I think it'll be useful to have a separate --only
option that does adhere to the config
In my
.ameba.yml
I have this file excluded for the CyclomaticComplexity rule.But when running ameba with the
--only
option./lib/ameba/bin/ameba --only Metrics/CyclomaticComplexity
It seems like Ameba still complains about the issue
Ameba is able to ignore the file fine when running without
--only
It makes sense for options like
--all
to ignore rules but I don't think the same applies for--only
. Is this behavior intended?