yegor256 / qulice

Quality Police for Java projects: aggregator of Checkstyle and PMD
https://www.qulice.com
Other
301 stars 111 forks source link

No "Missing @Override" message and "Missing Javadoc" is a poor message when @Override could also solve #770

Open westonal opened 8 years ago

westonal commented 8 years ago

Noticed on https://github.com/jcabi/jcabi-manifests project.

Reproduction example, where allValues is from an interface:

public List<String> allValues(final String key) {
    return new ArrayList<String>(this.multimap.get(key));
}

Qulice: Missing a Javadoc comment. (JavadocMethodCheck) (And no mention of the missing Override annotation)

Add a Java doc:

/**
 * Test.
 * @param key The key of the manifest attribute
 * @return List
 */
public List<String> allValues(final String key) {
    return new ArrayList<String>(this.multimap.get(key));
}

Qulice does not complain any more about this line. Even if doc is identical to the interfaces. And it does not complain about the missing @Override.

NB: Qulice also does not complain about this code:

@Override
public List<String> allValues(final String key) {
    return new ArrayList<String>(this.multimap.get(key));
}

Expected behavior when the method is Overrideable:

Qulice: Missing a Javadoc comment or Override annotation. (JavadocMethodCheck) and separately Missing an Override annotation

Note that we do have MissingOverride but that does this:

Verifies that the java.lang.Override annotation is present when the {@inheritDoc} javadoc tag is present.

So it's probably not the rule we want as only fires when @inheritDoc is present.

krzyk commented 8 years ago

@davvd valid bug

krzyk commented 8 years ago

@westonized thanks

davvd commented 8 years ago

@davvd valid bug

@krzyk tag "bug" added

davvd commented 8 years ago

@westonized thank you for reporting this, I added 15 mins to your acc, transaction AP-3L3886498X343551H

krzyk commented 8 years ago

@davvd this is postponed

davvd commented 8 years ago

@davvd this is postponed

@krzyk thanks, I added "postponed" label

davvd commented 8 years ago

@davvd this is postponed

@krzyk no problem, I will try to find somebody else