Skip to content

Instantly share code, notes, and snippets.

@casperisfine
Created March 1, 2024 10:09
Show Gist options
  • Save casperisfine/a8517249545a84da8de4452c92afad42 to your computer and use it in GitHub Desktop.
Save casperisfine/a8517249545a84da8de4452c92afad42 to your computer and use it in GitHub Desktop.
$ 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
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