mirror of
https://github.com/github/codeql.git
synced 2026-04-22 07:15:15 +02:00
Allow @param tags to apply to record parameters
This commit is contained in:
@@ -32,12 +32,24 @@ where
|
||||
)
|
||||
or
|
||||
documentable instanceof ClassOrInterface and
|
||||
not documentable instanceof Record and
|
||||
not exists(TypeVariable tv | tv.getGenericType() = documentable |
|
||||
"<" + tv.getName() + ">" = paramTag.getParamName()
|
||||
) and
|
||||
msg =
|
||||
"@param tag \"" + paramTag.getParamName() +
|
||||
"\" does not match any actual type parameter of type \"" + documentable.getName() + "\"."
|
||||
or
|
||||
documentable instanceof Record and
|
||||
not exists(TypeVariable tv | tv.getGenericType() = documentable |
|
||||
"<" + tv.getName() + ">" = paramTag.getParamName()
|
||||
) and
|
||||
not documentable.(Record).getCanonicalConstructor().getAParameter().getName() =
|
||||
paramTag.getParamName() and
|
||||
msg =
|
||||
"@param tag \"" + paramTag.getParamName() +
|
||||
"\" does not match any actual type parameter or record parameter of record \"" +
|
||||
documentable.getName() + "\"."
|
||||
else
|
||||
// The tag has no value at all.
|
||||
msg = "This @param tag does not have a value."
|
||||
|
||||
Reference in New Issue
Block a user