Java: Normalize parentheses.

This commit is contained in:
Anders Schack-Mulligen
2018-11-28 15:01:25 +01:00
parent 41edd61e2e
commit ae44b90456
84 changed files with 649 additions and 876 deletions

View File

@@ -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"
}
}

View File

@@ -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