puppet-lint-trailing_comma-check 0.1.2 → 0.1.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d67395151a03a6376cb6ac21c9858adf686dd1d
|
4
|
+
data.tar.gz: 890f46cdc36f8aa114432dce26631230e4a24c19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|