puppet-lint-param-docs 1.3.0 → 1.3.1

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: fe4696949ca7caeccf27cb18d522a4813218dc4d
4
- data.tar.gz: 812dba9986c2cd858376fb452b4d05617fcd5c09
3
+ metadata.gz: 8b74b2eba1bf2552829262b8cbbb7ec77de00457
4
+ data.tar.gz: 072f70beee8e599b8b50e8a26aa9f848eb1faa9a
5
5
  SHA512:
6
- metadata.gz: eca1b30cb791537f7b47695629e3161bb6d584f239054c61eef830b3a3671e28dc4c7e37efcf97f4916d9ee59a38f27cbd240671b31b7902588d88d89a92caf5
7
- data.tar.gz: 86641b2086ef5b0eff3dd076fe5ad1d032787394f72b5950896a8b3c87017b075e2477fa32dfb50c61d2e738e2fbf32a4bcd7ece3cfb08899bf4268349362d9a
6
+ metadata.gz: 368cea9c49874b060719f7663aba531515435777be4185112cc22dd0c767d9ca234f2533c0ac40d486f69947fecdcb9d01cc05a73ddb737a1c1eac96cb0bd84f
7
+ data.tar.gz: d97334cb071b50f732b785b6b068e02fb486248149209d1e5fdcd82ddc14a7d2e47b4aae0c70f13fc7460868bef2c6bc1ba49e0d83967b945b548661e5a36d28
@@ -8,7 +8,7 @@ PuppetLint.new_check(:parameter_documentation) do
8
8
  next if [:CLASS, :DEFINE, :NEWLINE, :WHITESPACE, :INDENT].include?(dtok.type)
9
9
  if [:COMMENT, :MLCOMMENT, :SLASH_COMMENT].include?(dtok.type)
10
10
  if dtok.value =~ /\A\s*\[\*([a-zA-Z0-9_]+)\*\]/ or
11
- dtok.value =~ /\A\s*\$([a-zA-Z0-9_]+)::/
11
+ dtok.value =~ /\A\s*\$([a-zA-Z0-9_]+):: +/
12
12
  doc_params << $1
13
13
  end
14
14
  else
@@ -369,4 +369,26 @@ define foreman (
369
369
  expect(problems).to have(0).problems
370
370
  end
371
371
  end
372
+
373
+ context 'class with hard tab indentation and rdoc parsing ($bar::)' do
374
+ let(:code) do
375
+ <<-EOS.gsub(/^\s+/, '')
376
+ # Example class
377
+ #
378
+ # === Parameters:
379
+ #
380
+ # $foo:: example
381
+ #
382
+ class example($foo) { }
383
+ EOS
384
+ end
385
+
386
+ it 'should detect a single problem' do
387
+ expect(problems).to have(1).problem
388
+ end
389
+
390
+ it 'should create a warning' do
391
+ expect(problems).to contain_warning(class_msg % :foo).on_line(7).in_column(15)
392
+ end
393
+ end
372
394
  end
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.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominic Cleal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-24 00:00:00.000000000 Z
11
+ date: 2015-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: puppet-lint