puppet-lint-class_alignment-check 0.2.3 → 0.2.4

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: 472da99d1199ebc852ca972b0df75171b5421ec006e03fa02af41a1eefcbbff7
4
- data.tar.gz: eb86074f1126e1f27749f33f6d4572892efe8dfd490208e35cd1a5ea359f9357
3
+ metadata.gz: ebf0e96bee2765a17143585f49c445c388612b1563ac6ec54513ee39989013ef
4
+ data.tar.gz: 95d3539f4c25fd584610774c695394fb43b17ebb3881e0e73976f0a337eb6a57
5
5
  SHA512:
6
- metadata.gz: b21647377367ee30cd6eaae3280e4baf6359ffb9b1b62ed27791d5ff84649b0b47f4e209d6bd6e45bd5468f719877690892c79835f12be1641a515e7abd929fa
7
- data.tar.gz: 9175489f85c7e46de2c76d29a9ec3d0d36d9287892a88f2add6df9c5f9fc7ca6841c8b0e0d2601ee7f78d2192d218999bca97e064a9fcae99c9852a1abe2241f
6
+ metadata.gz: 374133ecbc4fa790491148cc2f62bbe630584891a10df2d3cffec9ce289b2b63ab8bdd6fcd43477735f25fe52e246535017af0f59d27b75f60bd9bf3714bff3c
7
+ data.tar.gz: d98666d602b2d846c5ad815d6f06b1dd15fa29ef7c896f6b507217d14e54f5536202aaef80127fc6b900b4ecd05b5183214641e55e45ae27a45dd7f28b0ba856
@@ -113,12 +113,12 @@ def check_for(character)
113
113
  arrow_column[level_idx] = this_arrow_column if arrow_column[level_idx] < this_arrow_column
114
114
 
115
115
  (level_tokens[level_idx] ||= []) << token
116
- elsif token.prev_token.type == :LPAREN
116
+ elsif token == resource_tokens[0]
117
117
  level_idx += 1
118
118
  arrow_column << 0
119
119
  level_tokens[level_idx] ||= []
120
120
  param_column << nil
121
- elsif token.next_token.type == :RPAREN
121
+ elsif token == resource_tokens[-1]
122
122
  if (level_tokens[level_idx] ||= []).map(&:line).uniq.length > 1
123
123
  level_tokens[level_idx].each do |arrow_tok|
124
124
  next if arrow_tok.column == arrow_column[level_idx] || level_tokens[level_idx].size == 1
@@ -280,7 +280,7 @@ describe 'class_params_alignment' do
280
280
  <<-END
281
281
  class name (
282
282
  $aaa = function('foo', 'bar'),
283
- $bbb = function('foo', 'bar'),
283
+ $bbb = function('foo', 'bar'),
284
284
  Boolean $key1 = false,
285
285
  Enum['never', 'allow', 'try', 'demand'] $key2,
286
286
  $materializer_version = $foo ? {
@@ -308,7 +308,7 @@ describe 'class_params_alignment' do
308
308
 
309
309
  it 'should fix 4 problems' do
310
310
  expect(problems).to contain_fixed(format(msg, 53, 13)).on_line(2).in_column(13)
311
- expect(problems).to contain_fixed(format(msg, 53, 13)).on_line(3).in_column(13)
311
+ expect(problems).to contain_fixed(format(msg, 53, 15)).on_line(3).in_column(15)
312
312
  expect(problems).to contain_fixed(format(msg, 53, 21)).on_line(4).in_column(21)
313
313
  expect(problems).to contain_fixed(format(msg, 53, 11)).on_line(6).in_column(11)
314
314
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-lint-class_alignment-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anh Pham