mirror of
https://gitee.com/pnoker/iot-dc3.git
synced 2026-10-31 02:01:51 +08:00
upgrade checkstyle from a naming-only ruleset to a public-api gate: - unusedimports: dead imports fail the build (zero violations existed at adoption) - missingjavadoctype/method: public types and members must carry javadoc (scope public, @override exempt) - about 140 doc comments were added across records, filters, stores and gRPC servers - method name format now rejects find/query/fetch prefixes, encoding the repo crud verb law (select stays reserved for mybatis mappers and is policed by review) - suppressions: skip protobuf generated-sources, which only enter the scan in full-reactor builds - spotless: ratchet checks to origin/main so legacy formatting debt stops blocking unrelated changes and CI formats only what changed
70 lines
2.9 KiB
XML
70 lines
2.9 KiB
XML
<?xml version="1.0"?>
|
|
<!--
|
|
Copyright 2016-present the IoT DC3 original author or authors.
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Affero General Public License as
|
|
published by the Free Software Foundation, either version 3 of the
|
|
License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU Affero General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
-->
|
|
<!DOCTYPE module PUBLIC
|
|
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
|
|
"https://checkstyle.org/dtds/configuration_1_3.dtd">
|
|
<module name="Checker">
|
|
<property name="charset" value="UTF-8"/>
|
|
|
|
<module name="SuppressionFilter">
|
|
<property name="file" value="${checkstyle.suppressions.file}"/>
|
|
</module>
|
|
|
|
<module name="TreeWalker">
|
|
<!-- Naming conventions -->
|
|
<module name="TypeName"/>
|
|
<!-- CRUD verb convention (AGENTS.md): find*/query*/fetch* are not used;
|
|
select* stays reserved for MyBatis mapper calls in *ManagerImpl, so it is
|
|
not forbidden here and is policed by review instead. -->
|
|
<module name="MethodName">
|
|
<property name="format" value="^(?!find|query|fetch)[a-z][a-zA-Z0-9]*$"/>
|
|
</module>
|
|
<module name="ParameterName"/>
|
|
<module name="LocalVariableName"/>
|
|
<module name="MemberName"/>
|
|
<module name="StaticVariableName"/>
|
|
<module name="ConstantName"/>
|
|
<module name="PackageName"/>
|
|
|
|
<!-- Public API Javadoc structure -->
|
|
<module name="JavadocType">
|
|
<property name="scope" value="public"/>
|
|
<property name="allowMissingParamTags" value="true"/>
|
|
</module>
|
|
<module name="JavadocMethod">
|
|
<property name="accessModifiers" value="public"/>
|
|
<property name="allowMissingParamTags" value="true"/>
|
|
<property name="allowMissingReturnTag" value="true"/>
|
|
<property name="allowedAnnotations" value="Override"/>
|
|
</module>
|
|
<!-- Dead imports and missing public API documentation. -->
|
|
<module name="UnusedImports"/>
|
|
<module name="MissingJavadocType">
|
|
<property name="scope" value="public"/>
|
|
</module>
|
|
<module name="MissingJavadocMethod">
|
|
<property name="scope" value="public"/>
|
|
<property name="allowedAnnotations" value="Override"/>
|
|
</module>
|
|
<module name="NonEmptyAtclauseDescription"/>
|
|
<module name="JavadocTagContinuationIndentation">
|
|
<property name="offset" value="0"/>
|
|
</module>
|
|
</module>
|
|
</module>
|