puppet-lint-manifest_whitespace-check 0.1.12 → 0.1.13

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
  SHA256:
3
- metadata.gz: 9e03f64681e0f77650a16f9cb6fdc2da2f02cdfcd7480070bab2c847de55088a
4
- data.tar.gz: 3a92cd24d10fbd164d6f08d3e8c5ef2777ddc9575658c4d49cba1e2719fcfcbf
3
+ metadata.gz: c6eb78b1b0aa97896074ac01224d0d9ec8d62fd113308cd715c0bb60ff26707c
4
+ data.tar.gz: f9c4c73d8a5698e6b3b44732f400a7f3506e9a784622ab8e741332c03f67d2d4
5
5
  SHA512:
6
- metadata.gz: ef768ef36782696c60b1e03ee44cf43916df55100415c84e0c636e9ea6eddadfe2536ab7e4c35bf514aba32e7861b8868f654a0b14b444cdafa507a71bad3d70
7
- data.tar.gz: 642d9a4ff1e10f056cd938b7206ffc0835ee479cdf7423beb7eb8c6d6cc8f923ae3478adb597c88903b9eb721d778275b33fc56a3d9563c91ad3af1d54a78fb8
6
+ metadata.gz: 82aeade9ab4d7c4106411ba01250e21c983f78e5d5aa5f53ac8e518f9344be7e219b8182ad6801330e721147d313458bdcbba97882f30170340d9ab5d4250715
7
+ data.tar.gz: fbe9b003c323b27e7361f8548e9d234558255fbd7a6229bd863c9f9c2482ef886f787d75455ebad9476127e1d9e08834f73e1467d57468e1af4f28211a68f9cb
@@ -9,7 +9,7 @@ def new_single_space
9
9
  end
10
10
 
11
11
  def after_bracket_tokens
12
- %i[RBRACE RBRACK RPAREN SEMIC COMMA COLON DOT NEWLINE DQMID DQPOST LBRACK]
12
+ %i[RBRACK RPAREN SEMIC COMMA COLON DOT NEWLINE DQMID DQPOST LBRACK]
13
13
  end
14
14
 
15
15
  def prev_non_space_token(token)
@@ -155,6 +155,18 @@ end
155
155
  describe 'manifest_whitespace_closing_bracket_after' do
156
156
  let(:closing_bracket_msg) { 'there should be either a bracket, punctuation mark, closing quote or a newline after a closing bracket, or whitespace and none of the aforementioned' }
157
157
 
158
+ context 'with many brackets' do
159
+ let(:code) do
160
+ <<~EOF
161
+ ensure_packages($spaceweather::packages, { require => Class['Mongodb::Globals'] })
162
+ EOF
163
+ end
164
+
165
+ it 'should detect no problems' do
166
+ expect(problems).to have(0).problem
167
+ end
168
+ end
169
+
158
170
  context 'with iterator' do
159
171
  let(:code) do
160
172
  <<~EOF
@@ -219,12 +231,12 @@ describe 'manifest_whitespace_closing_bracket_after' do
219
231
  end
220
232
 
221
233
  context 'with fix disabled' do
222
- it 'should detect 3 problems' do
223
- expect(problems).to have(3).problem
234
+ it 'should detect 2 problems' do
235
+ expect(problems).to have(2).problem
224
236
  end
225
237
 
226
238
  it 'should create a error' do
227
- expect(problems).to contain_error(closing_bracket_msg).on_line(9).in_column(32)
239
+ expect(problems).to contain_error(closing_bracket_msg).on_line(23).in_column(22)
228
240
  end
229
241
  end
230
242
 
@@ -252,7 +264,7 @@ describe 'manifest_whitespace_closing_bracket_after' do
252
264
  class example (
253
265
  String $content,
254
266
  ) {
255
- $value = { 'key' => ['value']}
267
+ $value = { 'key' => ['value'] }
256
268
  $value2 = [
257
269
  {
258
270
  'key' => 'value1',
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.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jo Vandeginste