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

Pronto-reek comments on files that are in exclude_paths #19

Closed
ibrahima opened this issue Jul 20, 2017 · 4 comments · Fixed by #23
Closed

Pronto-reek comments on files that are in exclude_paths #19

ibrahima opened this issue Jul 20, 2017 · 4 comments · Fixed by #23

Comments

@ibrahima
Copy link

Currently, pronto-reek will still check and comment on files that are in exclude_paths in your reek configuration. It seems like pronto-reek should be somehow setting the force_exclusion option to true as introduced in troessner/reek#1200 .

I'll introduce a PR if I have time!

@ibrahima
Copy link
Author

ibrahima commented Jul 20, 2017

Actually, I'm not totally sure if there's a way for API consumers to set that option, it seems like a CLI only option right now. And it doesn't seem like there's any way to pass a CLI::Options object to Reek::Examiner.

@mvz
Copy link
Contributor

mvz commented Jul 21, 2017

Yes, it only influences how the CLI converts the paths given on the command line into a set of file paths to process. The Examiner object does not look at exclusions at all.

Your best bet for now is probably to check the current file against configuration.excluded_paths yourself.

@ibrahima
Copy link
Author

Good point, we can definitely do that within pronto-reek.

@timseal
Copy link

timseal commented Aug 11, 2017

I got round this by adding the excluded directories to the .pronto.yml file:

reek:
  exclude:
    - 'db/**/*'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants