Altering the alert for long line length to only alert on truly stupendously long lines. Otherwise, simply long names and normal registry keys will trip it, which is annoying.
git-svn-id: file:///home/svn/framework3/trunk@13953 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
d059670d67
commit
75bcb7cc5c
|
@ -14,6 +14,8 @@
|
||||||
#
|
#
|
||||||
##
|
##
|
||||||
|
|
||||||
|
LONG_LINE_LENGTH = 200 # From 100 to 200 which is stupidly long
|
||||||
|
|
||||||
def show_count(f, txt, num)
|
def show_count(f, txt, num)
|
||||||
puts "%s ... %s: %u" % [f, txt, num] if num > 0
|
puts "%s ... %s: %u" % [f, txt, num] if num > 0
|
||||||
end
|
end
|
||||||
|
@ -109,7 +111,7 @@ def check_single_file(dparts, fparts, f_rel)
|
||||||
in_comment = true if ln =~ /^=begin$/
|
in_comment = true if ln =~ /^=begin$/
|
||||||
next if in_comment
|
next if in_comment
|
||||||
|
|
||||||
if (ln.length > 100)
|
if (ln.length > LONG_LINE_LENGTH)
|
||||||
ll << [ idx, ln ]
|
ll << [ idx, ln ]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -145,7 +147,7 @@ def check_single_file(dparts, fparts, f_rel)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
if ll.length > 0
|
if ll.length > 0
|
||||||
puts '%s ... lines longer than 100 columns: %u' % [f, ll.length]
|
puts "%s ... lines longer than #{LONG_LINE_LENGTH} columns: %u" % [f, ll.length]
|
||||||
ll.each { |el|
|
ll.each { |el|
|
||||||
el[1] = el[1].inspect
|
el[1] = el[1].inspect
|
||||||
puts ' %8d: %s' % el
|
puts ' %8d: %s' % el
|
||||||
|
|
Loading…
Reference in New Issue