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

WIP: Add reek to detecting ruby code smells #292

Closed
wants to merge 1 commit into from
Closed

Conversation

timurvafin
Copy link
Member

Add Reek for detecting code smells in Ruby.
Configuration file stored in config/reek.yml.

Not sure about "Utility Function" smell detector, b/c of basic example of service object is a collection of utility functions.

class ActivateUser
  include Interactor

  def call
    context.activated_user = activate(context.user)
  end

  private

  def activate(user)
    user.update_attributes!(deactivated_at: nil)
    user
  end
end

@vast
Copy link
Contributor

vast commented Jul 22, 2015

@timurvafin, is there any overlapping checks with rubocop? For example, they definitely both check class/method length. Does it make sense to check for the same things twice?

@timurvafin
Copy link
Member Author

@vast, right. We could disable duplicate checks to minimize support hassle.
Let me check which checks do we really need.

@timurvafin timurvafin changed the title Add reek to detecting ruby code smells WIP: Add reek to detecting ruby code smells Jul 27, 2015
@timurvafin timurvafin closed this Feb 4, 2016
@timurvafin timurvafin deleted the reek branch February 4, 2016 13:14
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 this pull request may close these issues.

None yet

2 participants