Checkstyle updates

- remove MagicNumber
- add MissingJavadocType
- remove rules about contents of javadocs
This commit is contained in:
2024-07-17 20:11:41 -05:00
parent 61ec57af02
commit b7cfea157d
15 changed files with 40 additions and 30 deletions

View File

@ -213,18 +213,6 @@
<property name="tokens" value="VARIABLE_DEF"/> <property name="tokens" value="VARIABLE_DEF"/>
<property name="allowSamelineMultipleAnnotations" value="true"/> <property name="allowSamelineMultipleAnnotations" value="true"/>
</module> </module>
<module name="NonEmptyAtclauseDescription"/>
<!-- <module name="JavadocTagContinuationIndentation"/> -->
<!--
<module name="SummaryJavadoc">
<property name="forbiddenSummaryFragments" value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
</module>
-->
<!-- <module name="JavadocParagraph"/> -->
<module name="AtclauseOrder">
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
</module>
<module name="JavadocMethod"> <module name="JavadocMethod">
<property name="allowMissingParamTags" value="true"/> <property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/> <property name="allowMissingReturnTag" value="true"/>
@ -233,23 +221,14 @@
<module name="MissingJavadocMethod"> <module name="MissingJavadocMethod">
<property name="scope" value="private"/> <property name="scope" value="private"/>
</module> </module>
<module name="MissingJavadocType">
<property name="scope" value="private"/>
</module>
<module name="MethodName"> <module name="MethodName">
<property name="format" value="^[a-z][a-zA-Z0-9_]*$"/> <property name="format" value="^[a-z][a-zA-Z0-9_]*$"/>
<message key="name.invalidPattern" <message key="name.invalidPattern"
value="Method name ''{0}'' must match pattern ''{1}''."/> value="Method name ''{0}'' must match pattern ''{1}''."/>
</module> </module>
<module name="SingleLineJavadoc">
<property name="ignoreInlineTags" value="false"/>
</module>
<module name="MagicNumber">
<property name="severity" value="info"/>
<property name="tokens" value="NUM_DOUBLE, NUM_FLOAT, NUM_INT"/>
<property name="ignoreNumbers" value="0, 1, 2, 3, 4, 5, 6, 7, 8"/>
<property name="ignoreFieldDeclaration" value="true"/>
<property name="ignoreAnnotation" value="true"/>
</module>
<module name="EmptyCatchBlock"> <module name="EmptyCatchBlock">
<property name="exceptionVariableName" value="expected"/> <property name="exceptionVariableName" value="expected"/>
</module> </module>

View File

@ -344,6 +344,9 @@ public class RecordAutomationStatusUpdater
/***************************************************************************
**
***************************************************************************/
private record Key(QTableMetaData table, TriggerEvent triggerEvent) {} private record Key(QTableMetaData table, TriggerEvent triggerEvent) {}
} }

View File

@ -55,10 +55,10 @@ public abstract class AbstractPreInsertCustomizer implements TableCustomizerInte
///////////////////////////////////////////////////////////////////////////////// /***************************************************************************
// allow the customizer to specify when it should be executed as part of the // ** allow the customizer to specify when it should be executed as part of the
// insert action. default (per method in this class) is AFTER_ALL_VALIDATIONS // ** insert action. default (per method in this class) is AFTER_ALL_VALIDATIONS
///////////////////////////////////////////////////////////////////////////////// ***************************************************************************/
public enum WhenToRun public enum WhenToRun
{ {
BEFORE_ALL_VALIDATIONS, BEFORE_ALL_VALIDATIONS,

View File

@ -49,6 +49,9 @@ import com.kingsrook.qqq.backend.core.utils.CollectionUtils;
*******************************************************************************/ *******************************************************************************/
public abstract class ChildInserterPostInsertCustomizer extends AbstractPostInsertCustomizer public abstract class ChildInserterPostInsertCustomizer extends AbstractPostInsertCustomizer
{ {
/***************************************************************************
**
***************************************************************************/
public enum RelationshipType public enum RelationshipType
{ {
PARENT_POINTS_AT_CHILD, PARENT_POINTS_AT_CHILD,

View File

@ -152,5 +152,8 @@ public class AuditDetailAccumulator implements Serializable
} }
/***************************************************************************
**
***************************************************************************/
private record TableNameAndPrimaryKey(String tableName, Serializable primaryKey) {} private record TableNameAndPrimaryKey(String tableName, Serializable primaryKey) {}
} }

View File

@ -42,6 +42,9 @@ public class NowWithOffset extends AbstractFilterExpression<Instant>
/***************************************************************************
**
***************************************************************************/
public enum Operator public enum Operator
{PLUS, MINUS} {PLUS, MINUS}

View File

@ -43,6 +43,9 @@ public class ThisOrLastPeriod extends AbstractFilterExpression<Instant>
/***************************************************************************
**
***************************************************************************/
public enum Operator public enum Operator
{THIS, LAST} {THIS, LAST}

View File

@ -28,6 +28,9 @@ package com.kingsrook.qqq.backend.core.model.dashboard.widgets;
*******************************************************************************/ *******************************************************************************/
public class AlertData extends QWidgetData public class AlertData extends QWidgetData
{ {
/***************************************************************************
**
***************************************************************************/
public enum AlertType public enum AlertType
{ {
ERROR, ERROR,

View File

@ -33,6 +33,9 @@ public class BlockTooltip
/***************************************************************************
**
***************************************************************************/
public enum Placement public enum Placement
{BOTTOM, LEFT, RIGHT, TOP} {BOTTOM, LEFT, RIGHT, TOP}

View File

@ -39,6 +39,9 @@ public class ParentWidgetMetaData extends QWidgetMetaData
/***************************************************************************
**
***************************************************************************/
public enum LayoutType public enum LayoutType
{ {
GRID, GRID,

View File

@ -32,6 +32,9 @@ import com.kingsrook.qqq.backend.core.model.metadata.tables.UniqueKey;
*******************************************************************************/ *******************************************************************************/
public class CacheUseCase public class CacheUseCase
{ {
/***************************************************************************
**
***************************************************************************/
public enum Type public enum Type
{ {
PRIMARY_KEY_TO_PRIMARY_KEY, // e.g., the primary key in the cache table equals the primary key in the source table. PRIMARY_KEY_TO_PRIMARY_KEY, // e.g., the primary key in the cache table equals the primary key in the source table.

View File

@ -26,7 +26,6 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
@SuppressWarnings({ "checkstyle:javadoc", "DanglingJavadoc" })
/******************************************************************************* /*******************************************************************************
** List.of is "great", but annoying because it makes unmodifiable lists... ** List.of is "great", but annoying because it makes unmodifiable lists...
** So, replace it with this, which returns ArrayLists, which "don't suck" ** So, replace it with this, which returns ArrayLists, which "don't suck"

View File

@ -27,7 +27,6 @@ import java.util.Map;
import java.util.function.Supplier; import java.util.function.Supplier;
@SuppressWarnings({ "checkstyle:javadoc", "DanglingJavadoc" })
/******************************************************************************* /*******************************************************************************
** Map.of is "great", but annoying because it makes unmodifiable maps, and it ** Map.of is "great", but annoying because it makes unmodifiable maps, and it
** NPE's on nulls... So, replace it with this, which returns HashMaps (or maps ** NPE's on nulls... So, replace it with this, which returns HashMaps (or maps

View File

@ -117,6 +117,9 @@ public class BaseAPIActionUtil
/***************************************************************************
**
***************************************************************************/
public enum UpdateHttpMethod public enum UpdateHttpMethod
{PUT, POST} {PUT, POST}

View File

@ -69,6 +69,9 @@ public class ApiProcessMetaData
/***************************************************************************
**
***************************************************************************/
public enum AsyncMode public enum AsyncMode
{ {
NEVER, NEVER,