mirror of
https://github.com/inspec/inspec
synced 2024-11-22 12:43:07 +00:00
lint
This commit is contained in:
parent
c326e08739
commit
45f7057f30
4 changed files with 10 additions and 13 deletions
|
@ -27,10 +27,7 @@ Metrics/CyclomaticComplexity:
|
|||
Metrics/PerceivedComplexity:
|
||||
Max: 10
|
||||
Metrics/AbcSize:
|
||||
Max: 29
|
||||
Style/DotPosition:
|
||||
EnforcedStyle: trailing
|
||||
Enabled: true
|
||||
Max: 33
|
||||
Style/PercentLiteralDelimiters:
|
||||
PreferredDelimiters:
|
||||
'%': '{}'
|
||||
|
|
|
@ -45,11 +45,11 @@ class PostgresSession
|
|||
end
|
||||
end
|
||||
else
|
||||
lines = cmd.stdout.
|
||||
# remove the whole header (i.e. up to the first ^-----+------+------$)
|
||||
sub(/(.*\n)+([-]+[+])*[-]+\n/, '').
|
||||
# remove the tail
|
||||
sub(/\n[^\n]*\n\n$/, '')
|
||||
# remove the whole header (i.e. up to the first ^-----+------+------$)
|
||||
# remove the tail
|
||||
lines = cmd.stdout
|
||||
.sub(/(.*\n)+([-]+[+])*[-]+\n/, '')
|
||||
.sub(/\n[^\n]*\n\n$/, '')
|
||||
l = Lines.new(lines.strip, "PostgreSQL query: #{query}")
|
||||
RSpec.__send__('describe', l, &block)
|
||||
end
|
||||
|
|
|
@ -28,9 +28,9 @@ module FindFiles
|
|||
exit_status = result.exit_status
|
||||
|
||||
return [nil, exit_status] unless exit_status == 0
|
||||
files = result.stdout.split("\n").
|
||||
map(&:strip).
|
||||
find_all { |x| !x.empty? }
|
||||
files = result.stdout.split("\n")
|
||||
.map(&:strip)
|
||||
.find_all { |x| !x.empty? }
|
||||
[files, exit_status]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -140,7 +140,7 @@ module Vulcano
|
|||
private
|
||||
|
||||
# Idio(ma)tic unindent
|
||||
# TODO replace this
|
||||
# TODO: replace this
|
||||
#
|
||||
# @param [String] text string which needs to be unindented
|
||||
# @return [String] input with indentation removed
|
||||
|
|
Loading…
Reference in a new issue