inherit_from: .rubocop_todo.yml
AllCops:
- Exclude:
- - 'extensions/**/*'
- - 'skins/**/*'
- - 'tests/frontend/node_modules/**/*'
- - 'vendor/**/*'
-
-AllCops:
+ Exclude:
+ - 'extensions/**/*'
+ - 'skins/**/*'
+ - 'tests/frontend/node_modules/**/*'
+ - 'vendor/**/*'
StyleGuideCopsOnly: true
Metrics/LineLength:
Style/HashSyntax:
Enabled: false
-# Offense count: 4
-# Cop supports --auto-correct.
-Style/PerlBackrefs:
- Enabled: false
-
# Offense count: 81
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
end
def render_long_see(tag, formatter, position)
- if tag =~ /\A([^\s]+)( .*)?\Z/m
- name = $1
- doc = $2 ? ': ' + $2 : ''
+ match = /\A([^\s]+)( .*)?\Z/m.match(tag)
+
+ if match
+ name = match[1]
+ doc = match[2] ? ': ' + match[2] : ''
return formatter.format("{@link #{name}} #{doc}")
else
JsDuck::Logger.warn(nil, 'Unexpected @see argument: "' + tag + '"', position)
end
def render_long_context(tag, formatter, position)
- if tag =~ /\A([^\s]+)/m
- name = $1
+ match = /\A([^\s]+)/m.match(tag)
+
+ if match
+ name = match[1]
return formatter.format("`context` : {@link #{name}}")
else
JsDuck::Logger.warn(nil, 'Unexpected @context argument: "' + tag + '"', position)