flyerhzm / rails_best_practices

a code metric tool for rails projects
http://rails-bestpractices.com
MIT License
4.16k stars 276 forks source link

Add support for Ruby 3.1 shorthand hash syntax #388

Closed nickjer closed 2 years ago

nickjer commented 2 years ago

Ruby 3.1 has a new shorthand for its hash syntax. So you can now do things like...

def create
  @my_model = MyModel.new(value:)
  # ...
end

def value
  'value'
end

Unfortunately, for the above scenario I get the following linter warning remove unused methods (MyController#value) even though the method #value is being used.

flyerhzm commented 2 years ago

@nickjer it's fixed in version 1.23.0