AtomLinter / linter-reek

An Atom Linter package for Reek, the Ruby code smell detector.
https://atom.io/packages/linter-reek
MIT License
7 stars 5 forks source link

Use the project's root dir to run reek #151

Closed arielj closed 1 year ago

arielj commented 3 years ago

This PR fixes this issue https://github.com/AtomLinter/linter-reek/issues/149

Currently, the plugin uses the current file's dir, but that breaks the rules directories rules defined at the .reek.yml config file suggested for Rails projects:

directories:
  "app/controllers":
    IrresponsibleModule:
      enabled: false
    NestedIterators:
      max_allowed_nesting: 2
    UnusedPrivateMethod:
      enabled: false
    InstanceVariableAssumption:
      enabled: false
  "app/helpers":
    IrresponsibleModule:
      enabled: false
    UtilityFunction:
      enabled: false
  "app/mailers":
    InstanceVariableAssumption:
      enabled: false
  "app/models":
    InstanceVariableAssumption:
      enabled: false

Using the project's root path instead helps reek find directories that matches those config values.

arielj commented 3 years ago

@Arcanemagus a review is greatly appreciated, thanks

arielj commented 1 year ago

Closing this PR since this seems to be abandoned and atom will be sunsetted