puppet-lint-strict_indent-check 2.0.6 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30d1f1221da833545ef923f5293f8a83da0bcec09cf3b8f82ef3987ebf31db00
|
4
|
+
data.tar.gz: 74d0270b7cec272827b742a208d22c629ede699b9a459088146dc77d15422c45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ae0feb16096446d4601faa0d1b073d6fb01352c698a9ee4092274a6655a22bb24d03fcc66fb1f152dba287bb405c2af194315257b00a6445f45f6dcd3552608
|
7
|
+
data.tar.gz: 5d2a3a7c7ed96b1783954c33023cc9aa0beb06a447f4fef9eae3ecd19308099d37858f19452e41667bc3aa52ab063e930be9410c31d39016476191d7c470d8d9
|
@@ -131,9 +131,9 @@ PuppetLint.new_check(:'strict_indent') do
|
|
131
131
|
actual = 0
|
132
132
|
if token.next_token.type == :INDENT
|
133
133
|
actual = token.next_token.value.length
|
134
|
-
elsif token.prev_token.type == :HEREDOC
|
134
|
+
elsif !token.prev_token.nil? and token.prev_token.type == :HEREDOC
|
135
135
|
actual = token.prev_token.value.split("\n").last.length
|
136
|
-
elsif token.prev_token.type == :HEREDOC_OPEN
|
136
|
+
elsif !token.prev_token.nil? and token.prev_token.type == :HEREDOC_OPEN
|
137
137
|
actual = next_token.prev_token.value.split("\n").last.length
|
138
138
|
else
|
139
139
|
actual = 0
|
@@ -77,4 +77,17 @@ describe 'strict_indent' do
|
|
77
77
|
expect(problems).to have(1).problems
|
78
78
|
end
|
79
79
|
end
|
80
|
+
|
81
|
+
context 'blank line at beginning of file' do
|
82
|
+
let(:code) {
|
83
|
+
<<-EOF.gsub(/^ {8}/, '')
|
84
|
+
|
85
|
+
class () {}
|
86
|
+
EOF
|
87
|
+
}
|
88
|
+
|
89
|
+
it 'should detect 0 problems' do
|
90
|
+
expect(problems).to have(0).problems
|
91
|
+
end
|
92
|
+
end
|
80
93
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-lint-strict_indent-check
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Thorn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: puppet-lint
|