Skip to content

Commit c36c3f8

Browse files
authored
Checkstyle allow long URLs in inline comments (#932)
Adapt checkstyle LineLength ignore pattern to include comment lines starting with //. Checkstyle was already configured to ignore lines with long single words, such as long URLs, in *javadoc* comments, i.e. lines starting with *. Now we apply the same ignore rule also to inline comments, i.e. lines starting with //.
1 parent c6ce0a2 commit c36c3f8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

checkstyle.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@
190190
<module name="LineLength">
191191
<property name="fileExtensions" value="java"/>
192192
<property name="max" value="120"/>
193-
<property name="ignorePattern" value="^ *\* *([^ ]+|\{@code .*|&lt;a href=&quot;[^&quot;]+&quot;&gt;)$"/>
193+
<!-- allow long single words (e.g. urls) in javadoc and inline comments -->
194+
<property name="ignorePattern" value="^ *(\*|\/{2}) *([^ ]+|\{@code .*|&lt;a href=&quot;[^&quot;]+&quot;&gt;)$"/>
194195
</module>
195196

196197
<!-- Whitespace -->

0 commit comments

Comments
 (0)