rails_best_practices
https://github.com/flyerhzm/rails_best_practices
Ruby
a code metric tool for rails projects
RailsBestPractices::Reviews::MoveFinderToNamedScopeReview#finder?
check if the method_add_arg node is a finder. if the receiver of method_add_arg node is a constant, and the message of call method_add_arg is one of find, all, first or last, and any of its arguments is a hash, then it is a finder.
Edit
git clone [email protected]:flyerhzm/rails_best_practices.git
cd rails_best_practices
open lib/rails_best_practices/reviews/move_finder_to_named_scope_review.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-RailsBestPractices--Reviews--MoveFinderToNamedScopeReview-finder--for-pr
# Commit to gitgit add lib/rails_best_practices/reviews/move_finder_to_named_scope_review.rbgit commit -m "better docs for RailsBestPractices::Reviews::MoveFinderToNamedScopeReview#finder?"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-RailsBestPractices--Reviews--MoveFinderToNamedScopeReview-finder--for-pr
hub pull-request
# Celebrate!