puppet-lint-param-docs 1.7.5 → 1.7.6
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26491f65ee561c24b8246bccf4793d451e967aa7b40796a1dfaef59cbf959de4
|
4
|
+
data.tar.gz: 74fb61891a78bf720e76ab591ecd18ee4f1ba16b8eb3e57ffac0e7739635d991
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58c68e3b29fa294718ba1a43b86f8e9280c039fd94d422abd663f20f340e3fb6eede037b0a8df48553a5b1aaa179b537f82bd5c8499233c53c018e1aa7d5d647
|
7
|
+
data.tar.gz: 18ffb5c2dbdba005d56ead040efbdfbd0c5eec3142322338f1641e1847d62491cd71d817b4de67a417d2d1675aba2b3c5366f26867f6fc6734c564cd7733f8cb
|
@@ -99,9 +99,9 @@ PuppetLint.new_check(:parameter_documentation) do
|
|
99
99
|
while true
|
100
100
|
ptok = e.next
|
101
101
|
case ptok.type
|
102
|
-
when :LPAREN, :LBRACK
|
102
|
+
when :LPAREN, :LBRACK, :LBRACE
|
103
103
|
nesting += 1
|
104
|
-
when :RPAREN, :RBRACK
|
104
|
+
when :RPAREN, :RBRACK, :RBRACE
|
105
105
|
nesting -= 1
|
106
106
|
when :COMMA
|
107
107
|
break unless nesting > 0
|
@@ -955,4 +955,55 @@ define foreman (
|
|
955
955
|
expect(problems).to have(0).problems
|
956
956
|
end
|
957
957
|
end
|
958
|
+
|
959
|
+
context 'class with hash defaults containing variables' do
|
960
|
+
# Example taken from https://github.com/voxpupuli/puppet-lint-param-docs/issues/49
|
961
|
+
let(:code) do
|
962
|
+
<<-EOS.gsub(/^\s+/, '')
|
963
|
+
# @summary example class
|
964
|
+
#
|
965
|
+
# @param parameter_1
|
966
|
+
# @param parameter_2
|
967
|
+
# @param parameter_3
|
968
|
+
# @param parameter_4
|
969
|
+
# @param parameter_5
|
970
|
+
# @param parameter_6
|
971
|
+
# @param parameter_7
|
972
|
+
# @param parameter_8
|
973
|
+
# @param parameter_9
|
974
|
+
# @param parameter_10
|
975
|
+
# @param parameter_11
|
976
|
+
# @param parameter_12
|
977
|
+
#
|
978
|
+
class example (
|
979
|
+
Hash $parameter_1 = $variable1,
|
980
|
+
Hash $parameter_2 = { $variable2, },
|
981
|
+
Hash $parameter_3 = { $variable3, 'string1', },
|
982
|
+
Hash $parameter_4 = {
|
983
|
+
$variable4,
|
984
|
+
'string1',
|
985
|
+
},
|
986
|
+
Hash $parameter_5 = { $variable5, $variable6, 'string1', },
|
987
|
+
Hash $parameter_6 = { $variable7, 'string1', $variable8, },
|
988
|
+
Hash $parameter_7 = { 'string1', $variable9, },
|
989
|
+
Hash $parameter_8 = {
|
990
|
+
'string1',
|
991
|
+
$variable10,
|
992
|
+
'string2',
|
993
|
+
},
|
994
|
+
Hash $parameter_9 = [ { 'string1', $variable11, } ],
|
995
|
+
Hash $parameter_10 = [ { 'string1', $variable12, }, { 'string1', $variable13, } ],
|
996
|
+
Hash $parameter_11 = { [ 'string1', $variable14, ] },
|
997
|
+
Hash $parameter_12 = [ 'string1' => $variable15, 'string2' => $variable16, ],
|
998
|
+
) {
|
999
|
+
# foo
|
1000
|
+
}
|
1001
|
+
EOS
|
1002
|
+
end
|
1003
|
+
|
1004
|
+
it 'should not detect any problems' do
|
1005
|
+
puts problems
|
1006
|
+
expect(problems).to have(0).problems
|
1007
|
+
end
|
1008
|
+
end
|
958
1009
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-lint-param-docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vox Pupuli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: puppet-lint
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '1.1'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '4.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '1.1'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '4.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rspec
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
146
|
- !ruby/object:Gem::Version
|
147
147
|
version: '0'
|
148
148
|
requirements: []
|
149
|
-
rubygems_version: 3.2.
|
149
|
+
rubygems_version: 3.2.33
|
150
150
|
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: puppet-lint check to validate all parameters are documented
|