Skip to content

Commit

Permalink
Update Checkstyle config to match Filament (FabricMC#744)
Browse files Browse the repository at this point in the history
Allows the use of var in all locations.
  • Loading branch information
Juuxel authored Oct 26, 2022
1 parent 196ee87 commit 896dcf9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<module name="Checker">
<property name="charset" value="UTF-8"/>
<property name="fileExtensions" value="java"/>
<property name="localeLanguage" value="en"/>
<property name="localeCountry" value="US"/>

<module name="NewlineAtEndOfFile"/>

Expand Down Expand Up @@ -158,10 +160,5 @@
<module name="AtclauseOrder">
<property name="tagOrder" value="@param,@return,@throws,@deprecated"/>
</module>

<!-- Prevent var for all cases other than new instance creation -->
<module name="MatchXpath">
<property name="query" value="//VARIABLE_DEF[./TYPE/IDENT[@text='var'] and not(./ASSIGN/EXPR/LITERAL_NEW)]"/>
</module>
</module>
</module>
</module>

0 comments on commit 896dcf9

Please sign in to comment.