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

Style/Alias-20220928233909 #791

Merged
merged 4 commits into from
Jan 16, 2023
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Rubocop challenge!

Style/Alias

Safe autocorrect: Yes
✅ The autocorrect a cop does is safe (equivalent) by design.

Description

Overview

Enforces the use of either #alias or #alias_method
depending on configuration.
It also flags uses of alias :symbol rather than alias bareword.

Examples

EnforcedStyle: prefer_alias (default)

# bad
alias_method :bar, :foo
alias :bar :foo

# good
alias bar foo

EnforcedStyle: prefer_alias_method

# bad
alias :bar :foo
alias bar foo

# good
alias_method :bar, :foo

Auto generated by rubocop_challenger

@mathieujobin mathieujobin merged commit 0b761d6 into master Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant