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: bd465f6f8f5fe07dc5de6b9a9c3eb36e8f99e5c647e3d48a6001cd0f32749cf9
4
- data.tar.gz: e0bb7d7f3ee60d7bfed54e28ee24b78dae5a8477b870e41b33902bb86b3a5407
3
+ metadata.gz: 68ebf647e803e56c8a3fdb45055b756a31a8aad16ba5e2626d5f9c37b2cd3edf
4
+ data.tar.gz: 9e982b6494eb4a85e9853374c65ac21dc68431d506254d3975244f2ca9b1a902
5
5
  SHA512:
6
- metadata.gz: 85069ac6a3e3c7a349eea0e102a35f737204b210d35caf451e71ccd04da54bc241061947be20a93dc2adfc4a0ca91bc429243c27b7d4c50cc2fe072971dfecfd
7
- data.tar.gz: a7bde6a55568780469a5576c2353d77108c86e5e6ca84a448992fb9549dd89530f140ca2a1aae1f268145c25321b3acc8467706215a16fd90093043016691459
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
- if !%i[LPAREN LBRACK LBRACE].include?(prev_code_token.type) &&
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-lint-manifest_whitespace-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jo Vandeginste