puppet-lint-trailing_comma-check 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: 1ec20840a523a7403ecaeba4757f9b74554fa0f6
4
- data.tar.gz: 5358c21db4b26f7fb842099e391f2a780e1399b0
3
+ metadata.gz: 0eae387f233069ed79d644b27f18193e9fccf017
4
+ data.tar.gz: a1a89aea3e4c4f3c173c435253926ceabd5a65c1
5
5
  SHA512:
6
- metadata.gz: c4f1de378fd31e18f4326f191cd136d728f1e57a19d6e42eed51920138dfc2a3503c1c6aa57e412938f7ceea49fd1cf61b250e42fa1a9f50ac8e7a7436ae3534
7
- data.tar.gz: 5e6542eb7c3601659e8657bfc8284402ea48a4c92160ae579e53ec9679d1212f99b072845de8621d87a73ceaf6f81abdaecfa71ad22a6cfef985d28e8598d187
6
+ metadata.gz: 72c08cc4f9fba124c0ac3ec234b61cdee93655e1967e3c0bdb838cb927bc58a7ec523eb933c724bd8b60f54bea32d3e912ad4f282d623bf0f52fff0e7a6e513a
7
+ data.tar.gz: 610ed92e723260a385acd5694acb9ff4899fce9e333c704070be099b9f40454e36d24e284949d93b265f036e0f91f52e434d6c44f15d1cc9651112344c0a0f0a
@@ -3,7 +3,9 @@ PuppetLint.new_check(:trailing_comma) do
3
3
  # Resource and class declarations
4
4
  resource_indexes.each do |resource|
5
5
  lbo_token = resource[:tokens][-1].prev_code_token
6
- if lbo_token && lbo_token.type != :COLON && lbo_token.type != :COMMA
6
+ if lbo_token && lbo_token.type != :COLON && \
7
+ resource[:tokens][-1].type != :SEMIC && \
8
+ lbo_token.type != :COMMA
7
9
  notify :warning, {
8
10
  :message => 'missing trailing comma after last parameter',
9
11
  :line => lbo_token.next_token.line,
@@ -20,6 +20,10 @@ describe 'trailing_comma' do
20
20
  }
21
21
 
22
22
  file { '/tmp/foo': }
23
+
24
+ file { '/tmp/bar':
25
+ ensure => file;
26
+ }
23
27
  EOS
24
28
  }
25
29
 
@@ -44,6 +48,10 @@ describe 'trailing_comma' do
44
48
  }
45
49
 
46
50
  file { '/tmp/foo': }
51
+
52
+ file { '/tmp/bar':
53
+ ensure => file;
54
+ }
47
55
  EOS
48
56
  }
49
57
 
@@ -83,6 +91,10 @@ describe 'trailing_comma' do
83
91
  }
84
92
 
85
93
  file { '/tmp/foo': }
94
+
95
+ file { '/tmp/bar':
96
+ ensure => file;
97
+ }
86
98
  EOS
87
99
  }
88
100
 
@@ -111,6 +123,10 @@ describe 'trailing_comma' do
111
123
  }
112
124
 
113
125
  file { '/tmp/foo': }
126
+
127
+ file { '/tmp/bar':
128
+ ensure => file;
129
+ }
114
130
  EOS
115
131
  }
116
132
 
@@ -139,6 +155,10 @@ describe 'trailing_comma' do
139
155
  }
140
156
 
141
157
  file { '/tmp/foo': }
158
+
159
+ file { '/tmp/bar':
160
+ ensure => file;
161
+ }
142
162
  EOS
143
163
  )
144
164
  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.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Camptocamp