You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
log.warn"The @param tag for parameter '#{tag.name}' has no matching parameter at #{statement.file}:#{statement.line}."unlesstag.name == 'name' || tag.name == 'title'
Copy file name to clipboardExpand all lines: lib/puppet-strings/yard/handlers/ruby/base.rb
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ class PuppetStrings::Yard::Handlers::Ruby::Base < YARD::Handlers::Ruby::Base
14
14
# @return [String] Returns a string representation of the node or nil if a string representation was not possible.
15
15
defnode_as_string(node)
16
16
returnnilunlessnode
17
+
17
18
casenode.type
18
19
when:symbol,:symbol_literal
19
20
node.source[1..-1]
@@ -44,8 +45,10 @@ def node_as_string(node)
44
45
defget_name(statementobject,statementtype)
45
46
parameters=statementobject.parameters(false)
46
47
raiseYARD::Parser::UndocumentableError,"Expected at least one parameter to #{statementtype} at #{statementobject.file}:#{statementobject.line}."ifparameters.empty?
48
+
47
49
name=node_as_string(parameters.first)
48
50
raiseYARD::Parser::UndocumentableError,"Expected a symbol or string literal for first parameter but found '#{parameters.first.type}' at #{statement.file}:#{statement.line}."unlessname
log.warn"The @param tag for '#{tag.name}' has a different type definition than the actual attribute near #{object.file}:#{object.line}."iftag.types != actual_data_type
log.warn"The @return tag for '#{meth.name}' has a different type definition than the actual function near #{object.file}:#{object.line}. Expected #{actual_return_types}"
0 commit comments