1

Is there any way to tell SonarQube not to count an overriding method into the public documented api statistics if the overridden method is documented? SonarQube finds many methods lacking annotation due to the case below.

enter image description here

I know there is an annotation to ignore certain rules of SonarQube, however we don't want to add code to our project in order to satisfy SonarQube.

michaelbahr
  • 4,837
  • 2
  • 39
  • 75

1 Answers1

3

You could use inherit doc.

/**
 * {@inheritDoc}
 */
@Override
StackFlowed
  • 6,664
  • 1
  • 29
  • 45
  • 1
    During furthher investigation I stumbled upon an IntelliJ IDEA Inspection rule saying: "Reports any Javadoc comments which contain only the {@inheritDoc} tag. Since Javadoc copies the super class' comment if no comment is present, a comment containing only an {@inheritDoc} adds nothing. " Is SonarQube not able to detect this behavior? – michaelbahr Dec 07 '15 at 10:55