Fix checkstyle config not supporting windows line endings

dev/0.11
modmuss50 2019-11-13 18:00:07 +00:00
parent 54ac2df5dc
commit eb2424554f
1 changed files with 5 additions and 5 deletions

View File

@ -15,19 +15,19 @@
<!-- note: RegexpMultiline shows nicer messages than Regexp, but has to be outside TreeWalker --> <!-- note: RegexpMultiline shows nicer messages than Regexp, but has to be outside TreeWalker -->
<!-- disallow multiple consecutive blank lines --> <!-- disallow multiple consecutive blank lines -->
<module name="RegexpMultiline"> <module name="RegexpMultiline">
<property name="format" value="\n[\r\t ]*\n[\r\t ]*\n"/> <property name="format" value="\n[\t ]*\r?\n[\t ]*\r?\n"/>
<property name="message" value="adjacent blank lines"/> <property name="message" value="adjacent blank lines"/>
</module> </module>
<!-- disallow blank after { --> <!-- disallow blank after { -->
<module name="RegexpMultiline"> <module name="RegexpMultiline">
<property name="format" value="\{[\r\t ]*\n[\r\t ]*\n"/> <property name="format" value="\{[\t ]*\r?\n[\t ]*\r?\n"/>
<property name="message" value="blank line after '{'"/> <property name="message" value="blank line after '{'"/>
</module> </module>
<!-- disallow blank before } --> <!-- disallow blank before } -->
<module name="RegexpMultiline"> <module name="RegexpMultiline">
<property name="format" value="\n[\r\t ]*\n[\r\t ]*\}"/> <property name="format" value="\n[\t ]*\r?\n[\t ]*\}"/>
<property name="message" value="blank line before '}'"/> <property name="message" value="blank line before '}'"/>
</module> </module>
@ -47,14 +47,14 @@
- <indentation> as captured earlier - <indentation> as captured earlier
- <control statement> as specified above - <control statement> as specified above
- { before the next new line --> - { before the next new line -->
<property name="format" value="(?&lt;=\n)([\t]+)(?:[^/\n \t][^\n]*|/[^/\n][^\n]*|[^/\n][^\n]*(\n\1//[^\n]*)+)\n\1(|(if|do|while|for|try)[^\n]+)\{[\r\t ]*\n"/> <property name="format" value="(?&lt;=\n)([\t]+)(?:[^/\r\n \t][^\r\n]*|/[^/\r\n][^\r\n]*|[^/\r\n][^\r\n]*(\r?\n\1//[^\r\n]*)+)\r?\n\1(|(if|do|while|for|try)[^\r\n]+)\{[\t ]*\r?\n"/>
<property name="message" value="missing blank line before block at same indentation level"/> <property name="message" value="missing blank line before block at same indentation level"/>
</module> </module>
<!-- require blank after } in the same indentation level --> <!-- require blank after } in the same indentation level -->
<module name="RegexpMultiline"> <module name="RegexpMultiline">
<!-- \n<indentation>}\n<same indentation><whatever unless newline, '}' or starting with cas(e) or def(ault)> --> <!-- \n<indentation>}\n<same indentation><whatever unless newline, '}' or starting with cas(e) or def(ault)> -->
<property name="format" value="(?&lt;=\n)([\t]+)\}\n\1(?:[^\r\n\}cd]|c[^\r\na]|ca[^\r\ns]|d[^\r\ne]|de[^\r\nf])"/> <property name="format" value="(?&lt;=\n)([\t]+)\}\r?\n\1(?:[^\r\n\}cd]|c[^\r\na]|ca[^\r\ns]|d[^\r\ne]|de[^\r\nf])"/>
<property name="message" value="missing blank line after block at same indentation level"/> <property name="message" value="missing blank line after block at same indentation level"/>
</module> </module>