We've moved discussions to Discord

Standardrb fails on alias instead of alias_method

Chris Saylor
Hi all,

My app is running the CI on Gitlab and it's failing on the standardrb check.

  app/models/user/connected_account.rb:78:3: Style/Alias: Use `alias` instead of `alias_method` in a class body.
  app/models/user/connected_account.rb:79:3: Style/Alias: Use `alias` instead of `alias_method` in a class body.

I see that there was a commit to use alias_method instead of alias, but that seems to be what's causing the failure for me. Standardrb prefers alias over alias_method.

https://gitlab.com/gorails/jumpstart-pro/-/commit/c5fb353547dc3e70e5bc1c3445f3cc334bae9a18

I keep my project up to date with the jumpstart-pro repository. How is the main repo passing the CI tests and mine is not? Different CI settings?
Chris Oliver
Are you using the latest version of standardrb? They refine the rules regularly. The latest version is not complaining about alias for me.
Chris Saylor
bundle update standard did the trick. My Gemfile.lock had locked into an old version. Thank you!
Notifications
You’re not receiving notifications from this thread.