Fix Performance/FixedSize.
This commit is contained in:
parent
42efb44e7d
commit
240e49052c
@ -86,12 +86,6 @@ Metrics/ModuleLength:
|
|||||||
Metrics/ParameterLists:
|
Metrics/ParameterLists:
|
||||||
Max: 6
|
Max: 6
|
||||||
|
|
||||||
# Offense count: 2
|
|
||||||
Performance/FixedSize:
|
|
||||||
Exclude:
|
|
||||||
- 'Homebrew/dev-cmd/audit.rb'
|
|
||||||
- 'Homebrew/dev-cmd/bottle.rb'
|
|
||||||
|
|
||||||
# Offense count: 8
|
# Offense count: 8
|
||||||
Style/AccessorMethodName:
|
Style/AccessorMethodName:
|
||||||
Exclude:
|
Exclude:
|
||||||
|
|||||||
@ -467,7 +467,7 @@ class FormulaAuditor
|
|||||||
|
|
||||||
# Make sure the formula name plus description is no longer than 80 characters
|
# Make sure the formula name plus description is no longer than 80 characters
|
||||||
# Note full_name includes the name of the tap, while name does not
|
# Note full_name includes the name of the tap, while name does not
|
||||||
linelength = formula.name.length + ": ".length + desc.length
|
linelength = "#{formula.name}: #{desc}".length
|
||||||
if linelength > 80
|
if linelength > 80
|
||||||
problem <<-EOS.undent
|
problem <<-EOS.undent
|
||||||
Description is too long. \"name: desc\" should be less than 80 characters.
|
Description is too long. \"name: desc\" should be less than 80 characters.
|
||||||
|
|||||||
@ -436,7 +436,7 @@ module Homebrew
|
|||||||
puts output
|
puts output
|
||||||
update_or_add = "add"
|
update_or_add = "add"
|
||||||
if s.include? "stable do"
|
if s.include? "stable do"
|
||||||
indent = s.slice(/^ +stable do/).length - "stable do".length
|
indent = s.slice(/^( +)stable do/, 1).length
|
||||||
string = s.sub!(/^ {#{indent}}stable do(.|\n)+?^ {#{indent}}end\n/m, '\0' + output + "\n")
|
string = s.sub!(/^ {#{indent}}stable do(.|\n)+?^ {#{indent}}end\n/m, '\0' + output + "\n")
|
||||||
else
|
else
|
||||||
string = s.sub!(
|
string = s.sub!(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user