Using Reek Ruby gem: a tool that examines Ruby classes, modules and methods.
∑ ∑ Reports any code SMELLS it detects. ∑ ∑
We use The interface of the beautifull Linter to prived the neet features of Reek.
1 - Linter package. To install Linter: Linter.
2 - Reek gem.
Make ensure that reek
is installed on your system.
== To install reek
, do the following:
gem install reek
Add reek path:
- Up here in the settings panel
or
- here: ~/.atom/config.cson (choose Open Your Config in Atom menu).
"linter-ruby-reek":
executablePath: "/path/to/your/reek/here"
- Run
which reek
to find the path or runrbenv which reek
for rbenv users. - If you don't,
reek
will be the default settings.
Add reek configuration path (if it's not default config.reek):
- Up here in the settings panel
or
- here: ~/.atom/config.cson (choose Open Your Config in Atom menu).
"linter-ruby-reek":
configPath: "test.reek"
NOTE - 1:
- Open atom from the terminal if you don't see the linter working, it's Atom
doesn't see the path sometimes unless opened from the terminal.
I'm working to find the best way to avoid this issues
BUT, maybe you should add the Path in ~/.atom/config.cson in that order:
- "linter-ruby":
- "linter-reek":
- linter: I have to test that and see...
NOTE - 2:
- Please, note that reek only provides line numbers for errors, for now. So, columns are set to 1 as default.
Thank you! @ahmadSeleem