Skip to content

Commit

Permalink
Remove support for multi-line and slash comments
Browse files Browse the repository at this point in the history
Slash comments `//` don't even work and aren't in the Puppet 4+ language
spec.  Core puppet-lint already warns against multi-line comments and
they were removed from the Puppet 6 docs.  We also have zero tests using
them in this plugin.
  • Loading branch information
alexjfisher committed Oct 1, 2020
1 parent da56c41 commit 57cb239
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppet-lint/plugins/check_parameter_documentation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def check
is_private = false
tokens[0..idx[:start]].each do |dtok|
next if [:CLASS, :DEFINE, :NEWLINE, :WHITESPACE, :INDENT].include?(dtok.type)
if [:COMMENT, :MLCOMMENT, :SLASH_COMMENT].include?(dtok.type)
if dtok.type == :COMMENT
if dtok.value =~ /\A\s*\[\*([a-zA-Z0-9_]+)\*\]/ or
dtok.value =~ /\A\s*\$([a-zA-Z0-9_]+):: +/ or
dtok.value =~ /\A\s*@param (?:\[.+\] )?([a-zA-Z0-9_]+)(?: +|$)/
Expand Down

0 comments on commit 57cb239

Please sign in to comment.