Created
March 1, 2024 10:09
-
-
Save casperisfine/a8517249545a84da8de4452c92afad42 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rubocop --only Lint/UnusedMethodArgument unused.rb | |
Inspecting 1 file | |
W | |
Offenses: | |
unused.rb:1:9: W: [Correctable] Lint/UnusedMethodArgument: Unused method argument - bar. If it's necessary, use _ or _bar as an argument name to indicate that it won't be used. If it's unnecessary, remove it. You can also write as foo(*) if you want the method to accept any arguments but don't care about them. | |
def foo(bar, baz: 1) | |
^^^ | |
unused.rb:1:14: W: Lint/UnusedMethodArgument: Unused method argument - baz. You can also write as foo(*) if you want the method to accept any arguments but don't care about them. | |
def foo(bar, baz: 1) | |
^^^ | |
1 file inspected, 2 offenses detected, 1 offense autocorrectable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def foo(bar, baz: 1) | |
1 + 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment