[3.4.0-map-sdk] code style and add npl catch
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
<exclude-pattern>.*/gen/.*</exclude-pattern>
|
||||
<exclude-pattern>.*Dagger*.*</exclude-pattern>
|
||||
|
||||
<!-- 最佳实践 -->
|
||||
|
||||
<!-- 用log代替e.PrintStackTrace -->
|
||||
<!-- <rule ref="category/java/bestpractices.xml/AvoidPrintStackTrace" />-->
|
||||
<!-- for/foreach 避免index重新赋值 -->
|
||||
@@ -33,6 +35,18 @@
|
||||
<property name="strictMode" value="true" />
|
||||
</properties>
|
||||
</rule>
|
||||
<!-- 检查赋值字段未使用问题 -->
|
||||
<rule ref="category/java/bestpractices.xml/UnusedAssignment">
|
||||
<properties>
|
||||
<property name="checkUnusedPrefixIncrement" value="true" />
|
||||
<property name="reportUnusedVariables" value="true" />
|
||||
</properties>
|
||||
</rule>
|
||||
<!-- 检查未使用的局部变量 -->
|
||||
<rule ref="category/java/bestpractices.xml/UnusedLocalVariable" />
|
||||
<!-- 检查未使用的private变量 -->
|
||||
<!-- <rule ref="category/java/bestpractices.xml/UnusedPrivateField" />-->
|
||||
<rule ref="category/java/bestpractices.xml/UseStandardCharsets" />
|
||||
|
||||
<!-- 容易出现运行时错误 -->
|
||||
<rule ref="category/java/errorprone.xml/AvoidBranchingStatementAsLastInLoop" />
|
||||
|
||||
Reference in New Issue
Block a user