[
https://issues.apache.org/jira/browse/NIFI-15406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18048596#comment-18048596
]
ASF subversion and git services commented on NIFI-15406:
--------------------------------------------------------
Commit 21fa19ac0405a712f2c96df98706861a42096380 in nifi's branch
refs/heads/main from Pierre Villard
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=21fa19ac04 ]
NIFI-15406 Add Checkstyle rules for code quality and modern Java best practices
(#10712)
Added the following Checkstyle rules:
- NewlineAtEndOfFile: Ensure files end with a newline
- UpperEll: Use uppercase 'L' for long literals
- OuterTypeFilename: Outer type name must match filename
- EqualsHashCode: Ensure equals() and hashCode() are defined together
- FallThrough: Require fall-through comments in switch statements
- StringLiteralEquality: Use equals() instead of == for String comparison
- CovariantEquals: Prevent covariant equals() definitions
- DefaultComesLast: Default case should be last in switch
- SimplifyBooleanExpression: Simplify boolean expressions
- SimplifyBooleanReturn: Simplify boolean return statements
- MissingOverride: Require @Override annotation
- EmptyStatement: Detect empty statements
- NeedBraces: Require braces for control statements
- ModifierOrder: Enforce JLS modifier order
- MultipleVariableDeclarations: One variable per declaration
- OneStatementPerLine: One statement per line
- AvoidNoArgumentSuperConstructorCall: Remove redundant super()
- PatternVariableName: Naming convention for pattern variables (Java 16+)
- RecordComponentName: Naming convention for record components (Java 16+)
- IllegalIdentifierName: Prevent reserved identifiers like 'var' (Java 10+)
- UnnecessarySemicolonInTryWithResources: Remove extra semicolons
- UnnecessarySemicolonAfterTypeMemberDeclaration: Remove extra semicolons
Signed-off-by: David Handermann <[email protected]>
> Add Checkstyle rules: NewlineAtEndOfFile, UpperEll, SimplifyBoolean, Java 15+
> checks, and others
> ------------------------------------------------------------------------------------------------
>
> Key: NIFI-15406
> URL: https://issues.apache.org/jira/browse/NIFI-15406
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Tools and Build
> Reporter: Pierre Villard
> Assignee: Pierre Villard
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> * NewlineAtEndOfFile
> * UpperEll
> * EqualsHashCode
> * FallThrough
> * StringLiteralEquality
> * CovariantEquals
> * DefaultComesLast
> * SimplifyBooleanExpression
> * SimplifyBooleanReturn
> * MissingOverride
> * EmptyStatement
> * PatternVariableName
> * RecordComponentName
> * IllegalIdentifierName
> * UnnecessarySemicolonInTryWithResources
> * UnnecessarySemicolonAfterTypeMemberDeclaration
> * AvoidNoArgumentSuperConstructorCall
> * NeedBraces
> * ModifierOrder
> * MultipleVariableDeclarations
> * OneStatementPerLine
--
This message was sent by Atlassian Jira
(v8.20.10#820010)