vscode-ruby version: 0.10.4Ruby reek linter uses the directory directive configurations.
Ruby reek linter is ignore directive directory configurations.
.reek configuration file in the project root folder with the following content: "app/controllers":
IrresponsibleModule:
enabled: false
I think the cause is that each file is being linted individually without reek knowing the context of its root directory? I don't know how to debug the extension so I can't dig any further.
The following command works as expected:
/my_project_root $ reek app/controllers
The following command doesn't pickup the directory directives:
/my_project_root/app $ reek controllers
PS: Thank for building this extension, it's great!!!
Just ran into this as well. Seems config.reek is not picked up.
@tyler-king @guzart thanks for your feedback, I'll take a look.
Any news on this? It's still there...
+1 :)
Update:
Created a PR #287 that resolves the exclude_paths part of this. After some additional testing, if the .reek config file is passed to the reek CLI then it will behave properly. However, in quickly modifying the the reek.js linter script to also include the reek config in the passed arguments, it does not work. Inspecting the spawned command from linter.js I can't quite figure out why this doesn't work as the arguments are being passed to the command.
Some additional info:
The .reek config is being used, but specifically the directory configurations are not working.
This works
IrresponsibleModule:
enabled: false
These examples do not
exclude_paths:
- core/db/migrate
"app/controllers":
IrresponsibleModule:
enabled: false
Running reek from the VSCode terminal in the workspace root does what it is supposed to and all the examples above in the .reek file work as expected.
Closing for issue cleanup. Apologies if this is still an issue. We are working to improve the core extension experience.
The following command works as expected:
/my_project_root $ reek app/controllersThe following command doesn't pickup the directory directives:
/my_project_root/app $ reek controllers
Can confirm. I guess the trick would be to run reek from root with the relative file path as argument. Should this issue be reopened?
Hey @johanbaaij, here鈥檚 the PR related to this issue https://github.com/rubyide/vscode-ruby/pull/575
Most helpful comment
Hey @johanbaaij, here鈥檚 the PR related to this issue https://github.com/rubyide/vscode-ruby/pull/575