puppet-lint-manifest_whitespace-check 0.1.14 → 0.1.15
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: 77f398dd3202270ca5034002bbc6e877189b134bc087cf6a2defbf796e82df2a
|
4
|
+
data.tar.gz: 6d60d6dbc0c287c12d499338277a33d591778abc87e01afc01b831ea849c21f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e8a383cd0a51575c8ffd67bf3a01781b8774932fcc1d808e87c2043b402586272da2e1dee2f08da7e4a5765cf72c5bc3ed7cdf63dabb4cab1e47f85b00a5753
|
7
|
+
data.tar.gz: eaafaf5fe1a713aeb9d05665c924b87ee3afbd30e1a43fb0fab280a47850a53f89d4717272ca5071b40ca3216a66978dfea1a9b297fc789c3c894bb97d8ef720
|
@@ -9,7 +9,8 @@ PuppetLint.new_check(:manifest_whitespace_opening_bracket_before) do
|
|
9
9
|
next unless prev_token && prev_code_token
|
10
10
|
next if %i[LBRACK LBRACE COMMA SEMIC].include?(prev_code_token.type)
|
11
11
|
next unless %i[WHITESPACE NEWLINE INDENT].include?(prev_token.type)
|
12
|
-
|
12
|
+
|
13
|
+
if %i[INDENT NEWLINE].include?(prev_token.type) && %i[RBRACK RBRACE].include?(prev_code_token.type)
|
13
14
|
next
|
14
15
|
end
|
15
16
|
next unless tokens.index(prev_code_token) != tokens.index(bracket_token) - 2 ||
|
@@ -8,10 +8,12 @@ describe 'manifest_whitespace_opening_bracket_before' do
|
|
8
8
|
context 'with iterator' do
|
9
9
|
let(:code) do
|
10
10
|
<<~EOF
|
11
|
-
|
12
|
-
|
11
|
+
{
|
12
|
+
if condition {
|
13
|
+
}
|
13
14
|
|
14
|
-
|
15
|
+
['ib0', 'ib1', 'ib2', 'ib3', 'pub', 'oob', '0', '184'].each |String $name| {
|
16
|
+
}
|
15
17
|
}
|
16
18
|
EOF
|
17
19
|
end
|