mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
Java: Normalize parentheses.
This commit is contained in:
@@ -49,9 +49,9 @@ class DocuCallable extends Callable {
|
||||
predicate hasAcceptableDocText() { acceptableDocText(this.getDoc().getJavadoc()) }
|
||||
|
||||
string toMethodOrConstructorString() {
|
||||
(this instanceof Method and result = "method")
|
||||
this instanceof Method and result = "method"
|
||||
or
|
||||
(this instanceof Constructor and result = "constructor")
|
||||
this instanceof Constructor and result = "constructor"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ where
|
||||
callable.(Documentable).getJavadoc().getAChild() = paramTag and
|
||||
(if callable instanceof Constructor then what = "constructor" else what = "method") and
|
||||
if exists(paramTag.getParamName())
|
||||
then (
|
||||
then
|
||||
// The tag's value is neither matched by a callable parameter name ...
|
||||
not callable.getAParameter().getName() = paramTag.getParamName() and
|
||||
// ... nor by a type parameter name.
|
||||
@@ -24,7 +24,7 @@ where
|
||||
) and
|
||||
msg = "@param tag \"" + paramTag.getParamName() + "\" does not match any actual parameter of " +
|
||||
what + " \"" + callable.getName() + "()\"."
|
||||
) else
|
||||
else
|
||||
// The tag has no value at all.
|
||||
msg = "This @param tag does not have a value."
|
||||
select paramTag, msg
|
||||
|
||||
Reference in New Issue
Block a user