Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--only CLI flag appears to ignore excluded files within config #396

Open
syeopite opened this issue Jul 30, 2023 · 1 comment
Open

--only CLI flag appears to ignore excluded files within config #396

syeopite opened this issue Jul 30, 2023 · 1 comment
Labels

Comments

@syeopite
Copy link

syeopite commented Jul 30, 2023

In my .ameba.yml I have this file excluded for the CyclomaticComplexity rule.

Metrics/CyclomaticComplexity:
  Excluded:
  - src/invidious/videos/parser.cr

But when running ameba with the --only option
./lib/ameba/bin/ameba --only Metrics/CyclomaticComplexity

It seems like Ameba still complains about the issue

src/invidious/videos/parser.cr:157:5
[W] Metrics/CyclomaticComplexity: Cyclomatic complexity too high [58/10]
> def parse_video_info(video_id : String, player_response : Hash(String, JSON::Any)) : Hash(String, JSON::Any)

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?

@veelenga veelenga added the bug label Jul 30, 2023
@veelenga
Copy link
Member

That's a bug. Thanks for reporting.

@Sija Sija changed the title --only appears to ignore excluded files within config --only CLI flag appears to ignore excluded files within config Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants