You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2023/11/22 20:02:00 UTC
[jira] [Commented] (CAMEL-19461) Newcomer friendly source formatting
[ https://issues.apache.org/jira/browse/CAMEL-19461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17788883#comment-17788883 ]
Claus Ibsen commented on CAMEL-19461:
-------------------------------------
We should keep as-is as this has been the standard for many years
> Newcomer friendly source formatting
> -----------------------------------
>
> Key: CAMEL-19461
> URL: https://issues.apache.org/jira/browse/CAMEL-19461
> Project: Camel
> Issue Type: Improvement
> Reporter: Peter Palaga
> Priority: Major
>
> As discussed in https://github.com/apache/camel/pull/10403#issuecomment-1594287508 ,
> I'd like to replace the current checkstyle setup with a more ergonomic tooling that would format the sources during the default build. The new configuration would require much less attention from both newcomers and regular contributors. Most of formatting would be done automatically by Maven plugins without additional local configuration in IDE and without the need to fix the validation issues manually.
> Here is the idea how the individual Checkstyle checks can be replaced:
> * <module name="Translation"/> - no replacement, we do not have any translations, do we?
> * <module name="SuppressWarningsFilter"/> - no replacement, the annotations will be removed
> * <module name="Header"> - replace by maven license plugin
> * <module name="RegexpMultiline">
> <property name="format" value="(\bgpl\b)|(\bgplv2\b)|(\bgnu\sgeneral\spublic\s*license\b)|(\bwww\.gnu\.org\/licenses\/gpl\.txt\b)"/>
> <property name="ignoreCase" value="true"/>
> </module> - would transform it into a groovy/ant script
> * <module name="FileLength"> - no replacement
> * <module name="FileTabCharacter"> - done by formatter plugin
> * <module name="LineLength"> - done by formatter plugin
> * <module name="SuppressWithPlainTextCommentFilter"> - no replacement, the inline tags should be removed
> * <module name="ConstantName"/><module name="LocalFinalVariableName"/><module name="LocalVariableName"/><module name="MemberName"/><module name="MethodName"/><module name="PackageName"/><module name="ParameterName"/><module name="StaticVariableName"/><module name="TypeName"/> - no replacement. I do not think we had many PR in the past where these would hit.
> * <module name="AvoidStarImport"> - should be done by impsort plugin
> * <module name="IllegalImport"/> <!-- defaults to sun.* packages --> I guess using banned dependencies of enforcer plugin is a better way to enforce this?
> * <module name="RedundantImport"/> done either by impsort or formatter plugins.
> * <module name="ImportOrder"> - done by impsort
> * <module name="AnonInnerLength"><module name="ExecutableStatementCount"><module name="MethodLength"> - no replacement
> * <module name="ModifierOrder"/> - done by formatter
> * <module name="RedundantModifier"> - done by formatter IIRC
> * <module name="LeftCurly"/><module name="NeedBraces"/><module name="RightCurly"/> no replacement
> * <module name="CovariantEquals"/><module name="EmptyStatement"/><module name="EqualsHashCode"/><module name="MissingSwitchDefault"/><module name="StringLiteralEquality"/> - aren't these covered by PMD?
> * <module name="IllegalInstantiation"/><module name="SimplifyBooleanExpression"/> <module name="SimplifyBooleanReturn"/> - no replacement
> * <module name="NestedIfDepth"><module name="NestedTryDepth"><module name="SuperFinalize"/> - no replacement
> * <module name="IllegalThrows"> - PMD?
> * <module name="PackageDeclaration"/><module name="ReturnCount"> - no replacement
> * <module name="DeclarationOrder"/> - no replacement
> * <module name="ExplicitInitialization"/> - java compiler complains where really necessary
> * <module name="DefaultComesLast"/><module name="FallThrough"/><module name="MultipleVariableDeclarations"/><module name="UnnecessaryParentheses"/><module name="FinalClass"/><module name="HideUtilityClassConstructor"/><module name="MutableException"><module name="ThrowsCount"><module name="BooleanExpressionComplexity"><module name="UpperEll"/><module name="DescendantToken"> - no replacement
> * <module name="SuppressionCommentFilter"><module name="SuppressionCommentFilter"> - no replacement, the inline tags should be removed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)