Feature to exclude files / directories from analysis
I seem that Phinder hasn't excluded files and directories, for example /vendor directory, from analyses.
Phinder will be more useful if users can adjust analysis targets in detail.
In case of Querly, check feature can control files and directories.
What do you think about it?
I agree with your idea. I will check the Querly's way first (since I don't know it well) and then propose Phinder's way here before implementing the feature!
@akito19 Sorry for keeping you waiting.
I am planning to achieve the exclusion feature by adding ignore key into phinder.yml as follows:
rule:
...
ignore:
- vendor
...
Each element in ignore works as the same as a line of .gitignore.
Querly seems to support more complex configurations such as rule-id filtering. But for the first step in Phinder, I am planning to support only exclusion configuration feature. Does this match your need?
In my opinion, the exclude (or include) pattern syntax should be attached to each rule. Perhaps, Goodcheck or RuboCop ways are good for us.
Goodcheck
- id: com.example.github
pattern: Github
message: |
GitHub is GitHub, not Github
You may misspelling the name of the service!
justification:
- When you mean a service different from GitHub
- When GitHub is renamed
glob:
- app/views/**/*.html.slim
- config/locales/**/*.yaml
RuboCop
Bundler/DuplicatedGem:
Enabled: true
Include:
- '**/*.gemfile'
- '**/Gemfile'
- '**/gems.rb'
I agree with the proposal from @wata727. I will implement the per-rule exclusion/inclusion feature and notify you when it's done!