puppet-lint-param_comment-check 0.1.0 → 0.1.1

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: 001c0354a4c8e6d8d852d3f07122cf01f80603b17aaa8eebe9954ea4566704b6
4
- data.tar.gz: 2502c094ecbbebca5c3986ec25f8f1a2563b55cf1d430d8abe575e9d637abfe0
3
+ metadata.gz: b4b8ad42633483b29d912da99b108a9bcd277b7c6b1d21ebaeeedb4aa9634e12
4
+ data.tar.gz: 768790358859c7375df58da9fbbd2b932a94f606647d9f13e513fc119cbd29e3
5
5
  SHA512:
6
- metadata.gz: 60175714324271adf92951be259db9ad0dc292c35681784058d7f8b1e5dbec2ecb01c589186c89938aaec72ca62ccef50c7c5d96a2a67c33f08420c5f5f978a4
7
- data.tar.gz: 5a15fc0ea2b159d6d41470b0f74267d1a74d518f840da822c1e94544b258c78314f3a36e491c9d885e05ca2b68d6da00495305f20b6c39fba379901b263355d7
6
+ metadata.gz: eee0e509c76c55d1cc9b97ed444bdadbf1caa8a970e03e339618083d1e5019f0a18e70d627b4f691f1aa255a78a8240972db6a68d38b2a41c9f9993f3a3714e4
7
+ data.tar.gz: 6af8ad1b81d6d0b9f2e4d8cbf9cee33507e6813f025691187edab23adc9f0510372e4cd88362f614066904c32243bc3bc0a550fddfe238f9e5c250bfc897f592
@@ -57,6 +57,7 @@ def analyze_params(param_tokens)
57
57
  current_param = EMPTY_PARAM.dup
58
58
  end
59
59
  end
60
+ params.append(current_param) unless current_param == EMPTY_PARAM
60
61
  params
61
62
  end
62
63
 
@@ -11,6 +11,9 @@ class ParamWorkflow < FiniteMachine::Definition
11
11
  event :got_description, from: :awaiting_description, to: :awaiting_separator
12
12
  event :got_separator, from: :awaiting_separator, to: :awaiting_header
13
13
 
14
+ # for multi-line descriptions
15
+ event :got_description, from: :awaiting_separator, to: :awaiting_separator
16
+
14
17
  # handling options
15
18
  event :got_option_header, from: :awaiting_separator, to: :awaiting_option_description
16
19
  event :got_option_description, from: :awaiting_option_description, to: :awaiting_separator
@@ -11,6 +11,7 @@ describe 'param_comment' do
11
11
  #
12
12
  # @param mandatory
13
13
  # A mandatory parameter
14
+ # with two lines
14
15
  #
15
16
  # @param withdefault
16
17
  # A parameter with a default value
@@ -23,7 +24,7 @@ describe 'param_comment' do
23
24
  class my_class (
24
25
  String $mandatory,
25
26
  Boolean $withdefault = false,
26
- Optional[String] $optional = undef,
27
+ Optional[String] $optional = undef
27
28
  ) {}
28
29
  CODE
29
30
  end
@@ -170,6 +171,9 @@ describe 'param_comment' do
170
171
  # A mandatory parameter
171
172
  # @option mandatory [Boolean] :some_option
172
173
  # An option
174
+ # @option mandatory [String] :some_other_option
175
+ # Another option
176
+ # with multiple lines of description
173
177
  class my_class (
174
178
  Hash $mandatory,
175
179
  ) {}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-lint-param_comment-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Ploeger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-30 00:00:00.000000000 Z
11
+ date: 2022-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: puppet-lint