Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce new naming convention "InputXpath{Checkname}Xxxx.java" in IT area #14715

Closed
MANISH-K-07 opened this issue Mar 24, 2024 · 8 comments · Fixed by #14830
Closed

Enforce new naming convention "InputXpath{Checkname}Xxxx.java" in IT area #14715

MANISH-K-07 opened this issue Mar 24, 2024 · 8 comments · Fixed by #14830

Comments

@MANISH-K-07
Copy link
Contributor

MANISH-K-07 commented Mar 24, 2024

Follow-up of #6981

Until now, XpathRegressionTest validated the pattern SuppressionXpathRegressionXxxx.java for input filenames
All our existing files are named that way, so we bypass them until this issue is fixed.

The pattern has been updated to InputXpath{Checkname}Xxxx.java as part of PR #14713
All existing modules have been suppressed from validation.

As part of this issue, one module needs to be picked and all input files need to be renamed. Note that the xpath queries need to be verified in respective XpathRegression{Checkname}Test after filename change. Also, the set RENAME_INPUT_XPATH needs to be updated by removing the updated module to re-enable pattern validation.

The list of suppressions can be found at :

private static final Set<String> RENAME_INPUT_XPATH = Set.of(
"AbbreviationAsWordInName",
"AbstractClassName",
"AnnotationLocation",
"AnnotationOnSameLine",
"AnnotationUseStyle",
"AnonInnerLength",
"ArrayTrailingComma",
"ArrayTypeStyle",
"AvoidDoubleBraceInitialization",
"AvoidEscapedUnicodeCharacters",
"AvoidInlineConditionals",
"AvoidNestedBlocks",
"AvoidNoArgumentSuperConstructorCall",
"AvoidStarImport",
"AvoidStaticImport",
"BooleanExpressionComplexity",
"CatchParameterName",
"ClassMemberImpliedModifier",
"CommentsIndentation",
"ConstantName",
"CovariantEquals",
"CustomImportOrder",
"CyclomaticComplexity",
"DeclarationOrder",
"DefaultComesLast",
"EmptyBlock",
"EmptyCatchBlock",
"EmptyForInitializerPad",
"EmptyForIteratorPad",
"EmptyLineSeparator",
"EmptyStatement",
"EqualsAvoidNull",
"EqualsHashCode",
"ExplicitInitialization",
"FallThrough",
"FinalClass",
"FinalLocalVariable",
"FinalParameters",
"GenericWhitespace",
"HiddenField",
"IllegalCatch",
"IllegalImport",
"IllegalThrows",
"IllegalToken",
"IllegalTokenText",
"IllegalType",
"ImportControl",
"ImportOrder",
"Indentation",
"InnerAssignment",
"InnerTypeLast",
"InterfaceIsType",
"InterfaceMemberImpliedModifier",
"InvalidJavadocPosition",
"JavadocContentLocation",
"JavadocMethod",
"JavadocType",
"JavadocVariable",
"JavaNCSS",
"LambdaBodyLength",
"LambdaParameterName",
"LeftCurly",
"LocalFinalVariableName",
"MagicNumber",
"MatchXpath",
"MemberName",
"MethodCount",
"MethodLength",
"MethodName",
"MethodParamPad",
"MethodTypeParameterName",
"MissingCtor",
"MissingJavadocMethod",
"MissingJavadocPackage",
"MissingJavadocType",
"MissingOverride",
"MissingSwitchDefault",
"ModifierOrder",
"MultipleStringLiterals",
"MultipleVariableDeclarations",
"NeedBraces",
"NestedForDepth",
"NestedIfDepth",
"NestedTryDepth",
"NoArrayTrailingComma",
"NoClone",
"NoEnumTrailingComma",
"NoFinalizer",
"NoLineWrap",
"NoWhitespaceAfter",
"NoWhitespaceBefore",
"NoWhitespaceBeforeCaseDefaultColon",
"NPathComplexity",
"OneStatementPerLine",
"OneTopLevelClass",
"OperatorWrap",
"OuterTypeFilename",
"OuterTypeNumber",
"OverloadMethodsDeclarationOrder",
"PackageName",
"ParameterAssignment",
"ParameterName",
"ParameterNumber",
"ParenPad",
"RedundantImport",
"RequireThis",
"ReturnCount",
"RightCurly",
"SimplifyBooleanExpression",
"SimplifyBooleanReturn",
"SingleSpaceSeparator",
"StaticVariableName",
"StringLiteralEquality",
"SuperClone",
"ThrowsCount",
"TodoComment",
"TrailingComment",
"TypecastParenPad",
"TypeName",
"UncommentedMain",
"UnnecessaryParentheses",
"UnnecessarySemicolonAfterOuterTypeDeclaration",
"UnnecessarySemicolonAfterTypeMemberDeclaration",
"UnnecessarySemicolonInEnumeration",
"UnnecessarySemicolonInTryWithResources",
"UnusedImports",
"UnusedLocalVariable",
"UpperEll",
"VariableDeclarationUsageDistance",
"VisibilityModifier",
"WhitespaceAfter",
"WhitespaceAround",
"IllegalIdentifierName",
"IllegalInstantiation",
"PackageAnnotation",
"PackageDeclaration",
"PatternVariableName",
"RecordComponentName",
"RecordComponentNumber",
"RecordTypeParameterName");

Example of update : e70b8b5

@Kexin2000
Copy link
Contributor

Because #14719 fixes the failing build in master, list in the first post does not have a MethodTypeParameterName. I am on that :)

@MANISH-K-07
Copy link
Contributor Author

I am on VisibilityModifier

Kexin2000 added a commit to Kexin2000/checkstyle that referenced this issue Mar 26, 2024
@romani
Copy link
Member

romani commented Mar 26, 2024

@MANISH-K-07, I highly recommend to do fixes by packages or by packs of 20 files. to fnish this update quicker and not making a an epic from it.

@romani
Copy link
Member

romani commented Mar 26, 2024

@MANISH-K-07 , please update issue description to reference list of suppression and do udpates based on it.
checkboxes will be a problem to maintain, as fix is easy

@Lmh-java
Copy link
Contributor

I am on RecordTypeParameterName

@romani
Copy link
Member

romani commented Mar 28, 2024

@Lmh-java, we appreciate your help with easy issues, you are always welcome, but I recommend you next month to focus on more complicated issues to increase your chances to be selected to gsoc.

Ohm there are more participants, same suggestion for others.

@MANISH-K-07
Copy link
Contributor Author

@romani , like you said, let's not make an epic of this issue. I'll close this with multiple PRs at a time in 2 batches like @rnveach suggested at #14725 (comment)

@romani
Copy link
Member

romani commented Mar 28, 2024

ok, lets let only @MANISH-K-07 to work on this issue.

MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Mar 28, 2024
MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Mar 28, 2024
MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Apr 16, 2024
MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Apr 16, 2024
MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Apr 16, 2024
MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Apr 16, 2024
MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Apr 21, 2024
MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Apr 21, 2024
MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Apr 21, 2024
MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Apr 22, 2024
prathm3 pushed a commit to prathm3/checkstyle that referenced this issue Apr 23, 2024
MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Apr 24, 2024
MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants