puppet-lint-strict_indent-check 2.0.3 → 2.0.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
  SHA1:
3
- metadata.gz: 0ca2779a5e01d62f9ed6f3abd994d98d40087660
4
- data.tar.gz: c066ec2766b9dcde3957f4b31c068d7c904aedb5
3
+ metadata.gz: 9dbe725244f34e09b83f12591ed95c06353b0d75
4
+ data.tar.gz: 88edad01d3fd4403dd3e276379343958a555aba1
5
5
  SHA512:
6
- metadata.gz: 06d3eafafc44cfb3aee4304b424d866172f1867010050a9ab7b8b61485552f06bd3be6e0c67c2e796012acb95dff8915cb49d9d4f03e0c4cb268295f435d197b
7
- data.tar.gz: b7aba242f768404534dbe48c48dfa7ed4cc57eb417e551550167ad38d94adaef2e5802dc86895061737c48c3c4fd818e3c5939bb09984e771d43a1b921708ef9
6
+ metadata.gz: 2844e8953fd3bdafe782b189cafa43ff7189b2dca0c8936f3ff17bdb36797256f764dd0b0f8aaddc4197281cd06d390a09c556cc94555ac2eb1d937272db7c25
7
+ data.tar.gz: afd5441e0fa2485a00a2e315a14b0f08684e2db6f48e539316050950807b55fc5e41f37a6a0ecfd062db31c16228f955e340ae9e3895b3ed88451c00fcd706e8
@@ -133,9 +133,9 @@ PuppetLint.new_check(:'strict_indent') do
133
133
  if not [:COMMENT, :NEWLINE].include?(token.next_token.type)
134
134
  notify :warning, {
135
135
  :message => "indent should be #{expected} chars and is #{actual}",
136
- :line => token.line,
137
- :column => token.column,
138
- :token => token,
136
+ :line => token.next_token.line,
137
+ :column => token.next_token.column,
138
+ :token => token.next_token,
139
139
  :indent => expected,
140
140
  }
141
141
  end
@@ -145,11 +145,11 @@ PuppetLint.new_check(:'strict_indent') do
145
145
 
146
146
  def fix(problem)
147
147
  char_for_indent = ' '
148
- if [:INDENT,:WHITESPACE].include?(problem[:token].next_token.type)
149
- problem[:token].next_token.value = char_for_indent * problem[:indent]
148
+ if [:INDENT,:WHITESPACE].include?(problem[:token].type)
149
+ problem[:token].value = char_for_indent * problem[:indent]
150
150
  else
151
151
  tokens.insert(
152
- tokens.find_index(problem[:token]) + 1,
152
+ tokens.find_index(problem[:token]),
153
153
  PuppetLint::Lexer::Token.new(:INDENT, char_for_indent * problem[:indent], problem[:line], problem[:column])
154
154
  )
155
155
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-lint-strict_indent-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Thorn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-08 00:00:00.000000000 Z
11
+ date: 2016-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: puppet-lint
@@ -87,8 +87,8 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
- - README.md
91
90
  - LICENSE
91
+ - README.md
92
92
  - lib/puppet-lint/plugins/check_strict_indent.rb
93
93
  - spec/fixtures/fail/1.pp
94
94
  - spec/fixtures/pass/1.pp
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  version: '0'
115
115
  requirements: []
116
116
  rubyforge_project:
117
- rubygems_version: 2.0.14.1
117
+ rubygems_version: 2.6.0
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: puppet-lint strict indent check