Hello,
I have a lot of the squid:S00103 (Lines should not be too long)
issues on example code placed in Javadoc <pre> blocks.
Is there any chance that this rule will ignore lines placed in <pre> blocks?
Link to sources:
https://github.com/gabrysbiz/maven-plugin-utils/blob/develop/src/main/java/biz/gabrys/maven/plugin/util/parameter/ParametersLogBuilder.java#L40
Regards,
Adam Gabryś
--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/BLU436-SMTP211F4416185EE55AD5E675898020%40phx.gbl.
For more options, visit https://groups.google.com/d/optout.
Hi Michael,
I agree that rule should ignore lines with @link -
additionally it should also ignore @see (the same
situation). That fix will not solve all problems with
"<pre>" blocks but it is definitely easier to implement ;-)
One hint: maybe rule should ignore @link if its length is longer that maxLineLength - @linkStartPosition.
Noncompliant Code Example:
/**
* {@link very.long.link.so.rule.should.ignore.this.line very
long text which exceeds maximum length}
* {@link shortlink} this line can be split, but I'm very lazy
programmer and I don't like click "format code" in my IDE
* @see
this.should.never.be.split.SomethingInterestingWithLongName#getThatInterestingThing(String)
*/
Compliant Solution:
/**
* {@link very.long.link.so.rule.should.ignore.this.line very
long text which exceeds maximum length}
* {@link shortlink} this line is split, because I have learned
* how to format code in my IDE
* @see
this.should.never.be.split.SomethingInterestingWithLongName#getThatInterestingThing(String)
*/
Regards,
Adam Gabryś