puppet-lint-strict_indent-check 2.0.4 → 2.0.5
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: 774fca327b9758ac7472d007f70eb8998dd8e122
|
4
|
+
data.tar.gz: 59a9bd1bcbc55fd51a2c246254893d6cc825a734
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 529d73f1f372ecf68d4929577e7738a4df9c925792e8c5d02e1ff1ac244d471e6eebf67dd2f30ff81d1dd484a72edc4c036c1951e546db08ef1a61bea883062a
|
7
|
+
data.tar.gz: fa04875c8410244a07c37c98f4159f99caa63cd6c01f465581d32eacd95752618391500df6802e3848309d4f35d1016285945852aff05804501e6c3f5793271c
|
@@ -57,7 +57,7 @@ PuppetLint.new_check(:'strict_indent') do
|
|
57
57
|
|
58
58
|
# reset prev_token to last non-whitespace token on previous line
|
59
59
|
prev_token = token.prev_token
|
60
|
-
while not prev_token.nil? and prev_token.type == :WHITESPACE
|
60
|
+
while not prev_token.nil? and (prev_token.type == :WHITESPACE or prev_token.type == :COMMENT)
|
61
61
|
prev_token = prev_token.prev_token
|
62
62
|
end
|
63
63
|
|
@@ -41,6 +41,24 @@ describe 'strict_indent' do
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
+
context 'comment after resource title.' do
|
45
|
+
let(:code) {
|
46
|
+
<<-EOF.gsub(/^ {8}/, '')
|
47
|
+
class (
|
48
|
+
) {
|
49
|
+
file {
|
50
|
+
'this': #comment
|
51
|
+
ensure => 'present',
|
52
|
+
}
|
53
|
+
}
|
54
|
+
EOF
|
55
|
+
}
|
56
|
+
|
57
|
+
it 'should detect 0 problems' do
|
58
|
+
expect(problems).to have(0).problems
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
44
62
|
context 'invalid array indent' do
|
45
63
|
let(:code) {
|
46
64
|
<<-EOF.gsub(/^ {8}/, '')
|
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.
|
4
|
+
version: 2.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Thorn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-09 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
|
-
- LICENSE
|
91
90
|
- README.md
|
91
|
+
- LICENSE
|
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.
|
117
|
+
rubygems_version: 2.0.14.1
|
118
118
|
signing_key:
|
119
119
|
specification_version: 4
|
120
120
|
summary: puppet-lint strict indent check
|