[3.4.0-map-sdk] update rules

This commit is contained in:
zhongchao
2023-09-20 19:38:59 +08:00
parent b4c62dcba6
commit 692973e1fb

View File

@@ -13,6 +13,27 @@
<exclude-pattern>.*/gen/.*</exclude-pattern>
<exclude-pattern>.*Dagger*.*</exclude-pattern>
<!-- 用log代替e.PrintStackTrace -->
<!-- <rule ref="category/java/bestpractices.xml/AvoidPrintStackTrace" />-->
<!-- for/foreach 避免index重新赋值 -->
<!-- <rule ref="category/java/bestpractices.xml/AvoidReassigningLoopVariables">-->
<!-- <properties>-->
<!-- <property name="foreachReassign" value="deny" />-->
<!-- <property name="forReassign" value="deny" />-->
<!-- </properties>-->
<!-- </rule>-->
<!-- 应避免重新分配catch语句中捕获的异常变量 -->
<rule ref="category/java/bestpractices.xml/AvoidReassigningCatchVariables" />
<!-- StringBuffers/StringBuilders可能会大幅增长因此如果保存在寿命较长的对象中可能会成为内存泄漏的来源 -->
<rule ref="category/java/bestpractices.xml/AvoidStringBufferField" />
<!-- 在同一行中声明多个变量,会比较混乱 -->
<rule ref="category/java/bestpractices.xml/OneDeclarationPerLine">
<properties>
<property name="strictMode" value="true" />
</properties>
</rule>
<!-- 容易出现运行时错误 -->
<rule ref="category/java/errorprone.xml/AvoidBranchingStatementAsLastInLoop" />
<rule ref="category/java/errorprone.xml/AvoidDecimalLiteralsInBigDecimalConstructor" />