puppet-lint-manifest_whitespace-check 0.2.2 → 0.2.3
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: 68ebf647e803e56c8a3fdb45055b756a31a8aad16ba5e2626d5f9c37b2cd3edf
|
4
|
+
data.tar.gz: 9e982b6494eb4a85e9853374c65ac21dc68431d506254d3975244f2ca9b1a902
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7af1583cd0809ca34d8e6aa4fd63353873a326c1372cc757fa625c20a478cf6f0bf6a72af032b38038c6fe51f18f01035862d9f3c5b0e28518db503869758b58
|
7
|
+
data.tar.gz: 9699d991b726203e67c2aac3c9c69aaa5a94888fb6196b2dfbdac402ae91db990a86b07ad16a83da2ec499aacbb1c3958be63d047afd1a86e679d571e9fa5980
|
@@ -8,6 +8,7 @@ PuppetLint.new_check(:manifest_whitespace_opening_brace_before) do
|
|
8
8
|
|
9
9
|
next unless prev_token && prev_code_token
|
10
10
|
|
11
|
+
next if %i[COMMA].include?(prev_code_token.type) && %i[INDENT NEWLINE].include?(prev_token.type)
|
11
12
|
next if %i[COMMENT COLON].include?(prev_code_token.type)
|
12
13
|
|
13
14
|
if %i[LPAREN LBRACK LBRACE].include?(prev_code_token.type)
|
@@ -35,10 +36,7 @@ PuppetLint.new_check(:manifest_whitespace_opening_brace_before) do
|
|
35
36
|
prev_code_token = prev_non_space_token(token)
|
36
37
|
|
37
38
|
while prev_code_token != prev_token
|
38
|
-
|
39
|
-
%i[WHITESPACE INDENT NEWLINE].include?(prev_token.type)
|
40
|
-
raise PuppetLint::NoFix
|
41
|
-
end
|
39
|
+
raise PuppetLint::NoFix unless %i[WHITESPACE INDENT NEWLINE].include?(prev_token.type)
|
42
40
|
|
43
41
|
remove_token(prev_token)
|
44
42
|
prev_token = prev_token.prev_token
|