From: Ċ½eljko Filipin Date: Wed, 18 Mar 2015 17:50:13 +0000 (+0100) Subject: Fixed Lint/UnusedMethodArgument RuboCop offense X-Git-Tag: 1.31.0-rc.0~12014^2~2 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=07e09658e2dce7441ef2504ae3c59a28ee4b0be6;p=lhc%2Fweb%2Fwiklou.git Fixed Lint/UnusedMethodArgument RuboCop offense $ bundle exec rubocop --auto-correct Inspecting 25 files .W....................... Offenses: maintenance/jsduck/custom_tags.rb:14:26: W: [Corrected] Unused method argument - position. If it's necessary, use _ or _position as an argument name to indicate that it won't be used. def parse_doc(scanner, position) ^^^^^^^^ ... 25 files inspected, 2 offenses detected, 2 offenses corrected Bug: T91485 Change-Id: Ide96774c284af97f8d587bd6cde302c4500496ed --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index da1c3af036..6c84b527e0 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -5,11 +5,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 2 -# Cop supports --auto-correct. -Lint/UnusedMethodArgument: - Enabled: false - # Offense count: 8 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. diff --git a/maintenance/jsduck/custom_tags.rb b/maintenance/jsduck/custom_tags.rb index 2de3ac0e9f..9130227261 100644 --- a/maintenance/jsduck/custom_tags.rb +++ b/maintenance/jsduck/custom_tags.rb @@ -11,7 +11,7 @@ class CommonTag < JsDuck::Tag::Tag @repeatable = true end - def parse_doc(scanner, position) + def parse_doc(scanner, _position) if @multiline return { :tagname => @tagname, :doc => :multiline } else @@ -20,7 +20,7 @@ class CommonTag < JsDuck::Tag::Tag end end - def process_doc(context, tags, position) + def process_doc(context, tags, _position) context[@tagname] = tags end