puppet-lint-trailing_comma-check 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0eae387f233069ed79d644b27f18193e9fccf017
4
- data.tar.gz: a1a89aea3e4c4f3c173c435253926ceabd5a65c1
3
+ metadata.gz: 7d67395151a03a6376cb6ac21c9858adf686dd1d
4
+ data.tar.gz: 890f46cdc36f8aa114432dce26631230e4a24c19
5
5
  SHA512:
6
- metadata.gz: 72c08cc4f9fba124c0ac3ec234b61cdee93655e1967e3c0bdb838cb927bc58a7ec523eb933c724bd8b60f54bea32d3e912ad4f282d623bf0f52fff0e7a6e513a
7
- data.tar.gz: 610ed92e723260a385acd5694acb9ff4899fce9e333c704070be099b9f40454e36d24e284949d93b265f036e0f91f52e434d6c44f15d1cc9651112344c0a0f0a
6
+ metadata.gz: c9b0dcb07ff05ec38da689d4beb941c86d988744732df2126f7a3019469c00a38b6e38341d1064912d757959131fb0ff535d741a8cab2ec7c7c171ae7df23abb
7
+ data.tar.gz: 423bb368b8afbf50eef5bca8f6562ad1c627c6c5044d3e4e61ec29c481859212c0382037409b877a206d98ef8a0e0c7940f43076d727d7b6b4266c74167f7422
@@ -5,7 +5,8 @@ PuppetLint.new_check(:trailing_comma) do
5
5
  lbo_token = resource[:tokens][-1].prev_code_token
6
6
  if lbo_token && lbo_token.type != :COLON && \
7
7
  resource[:tokens][-1].type != :SEMIC && \
8
- lbo_token.type != :COMMA
8
+ lbo_token.type != :COMMA && \
9
+ lbo_token.next_token.type == :NEWLINE
9
10
  notify :warning, {
10
11
  :message => 'missing trailing comma after last parameter',
11
12
  :line => lbo_token.next_token.line,
@@ -24,6 +24,8 @@ describe 'trailing_comma' do
24
24
  file { '/tmp/bar':
25
25
  ensure => file;
26
26
  }
27
+
28
+ resources { 'sshkey': purge => true }
27
29
  EOS
28
30
  }
29
31
 
@@ -52,6 +54,8 @@ describe 'trailing_comma' do
52
54
  file { '/tmp/bar':
53
55
  ensure => file;
54
56
  }
57
+
58
+ resources { 'sshkey': purge => true }
55
59
  EOS
56
60
  }
57
61
 
@@ -95,6 +99,8 @@ describe 'trailing_comma' do
95
99
  file { '/tmp/bar':
96
100
  ensure => file;
97
101
  }
102
+
103
+ resources { 'sshkey': purge => true }
98
104
  EOS
99
105
  }
100
106
 
@@ -127,6 +133,8 @@ describe 'trailing_comma' do
127
133
  file { '/tmp/bar':
128
134
  ensure => file;
129
135
  }
136
+
137
+ resources { 'sshkey': purge => true }
130
138
  EOS
131
139
  }
132
140
 
@@ -159,6 +167,8 @@ describe 'trailing_comma' do
159
167
  file { '/tmp/bar':
160
168
  ensure => file;
161
169
  }
170
+
171
+ resources { 'sshkey': purge => true }
162
172
  EOS
163
173
  )
164
174
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-lint-trailing_comma-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Camptocamp