├── src ├── test │ ├── resources │ │ └── com │ │ │ └── puppycrawl │ │ │ └── tools │ │ │ └── checkstyle │ │ │ ├── InputEmptyFile.txt │ │ │ ├── header │ │ │ ├── H2.properties │ │ │ ├── H1.properties │ │ │ ├── H2.xml │ │ │ ├── H1.xml │ │ │ ├── H1.java │ │ │ └── H2.java │ │ │ ├── javadoc │ │ │ ├── bothfiles │ │ │ │ ├── package.html │ │ │ │ ├── package-info.java │ │ │ │ └── Ignored.java │ │ │ ├── pkghtml │ │ │ │ ├── package.html │ │ │ │ └── Ignored.java │ │ │ ├── pkginfo │ │ │ │ ├── invalidformat │ │ │ │ │ └── package-info.java │ │ │ │ ├── invalidinherit │ │ │ │ │ └── package-info.java │ │ │ │ ├── valid │ │ │ │ │ └── package-info.java │ │ │ │ └── annotation │ │ │ │ │ └── package-info.java │ │ │ ├── InputBadTag.java │ │ │ ├── InputTestNumberFomatException.java │ │ │ ├── GuavaFP.java │ │ │ ├── InputJavadocMethodIgnoreNameRegex.java │ │ │ ├── InputSummaryJavadocCheckNoPeriod.java │ │ │ ├── InputSummaryJavadocCheckPeriod.java │ │ │ └── AllowedAnnotations.java │ │ │ ├── coding │ │ │ ├── InputWithCommentOnly.java │ │ │ ├── GregorianCalendar.java │ │ │ ├── InputPackageDeclaration.java │ │ │ ├── InputMissingCtor.java │ │ │ ├── InputIllegalTypeStarImports.java │ │ │ ├── InputRequireThis2.java │ │ │ ├── InputModifiedControlVariableEnhancedForLoopVariable.java │ │ │ ├── InputIllegalThrowsCheckIgnoreOverriddenMethods.java │ │ │ ├── InputIllegalThrowsCheck.java │ │ │ ├── InputFinalLocalVariableEnhancedForLoopVariable.java │ │ │ ├── InputParameterAssignment.java │ │ │ ├── InputIllegalCatchCheck.java │ │ │ ├── InputReturnFromCatchCheck.java │ │ │ ├── InputFinalLocalVariableCheckFalsePositive.java │ │ │ ├── InputIllegalTypeStaticImports.java │ │ │ ├── InputFinalLocalVariableNativeMethods.java │ │ │ ├── InputEqualsHashCodeCheck.java │ │ │ └── InputMultipleVariableDeclarations.java │ │ │ ├── grammars │ │ │ ├── javadoc │ │ │ │ ├── htmlTags │ │ │ │ │ ├── ClosedOtherTag.txt │ │ │ │ │ ├── OneSimpleHtmlTag.txt │ │ │ │ │ ├── NegativeNumberInAttribute.txt │ │ │ │ │ ├── Comments.txt │ │ │ │ │ ├── AttributeValueWithoutQuotes.txt │ │ │ │ │ ├── UnclosedAndClosedParagraphs.txt │ │ │ │ │ ├── UnclosedParagraphFollowedByJavadocTag.txt │ │ │ │ │ ├── ListWithUnclosedItemInUnclosedParagraph.txt │ │ │ │ │ ├── HtmlTagsInParagraph.txt │ │ │ │ │ └── MixedCaseOfHtmlTags.txt │ │ │ │ ├── javadocTags │ │ │ │ │ ├── AsteriskInLiteral.txt │ │ │ │ │ ├── InnerBracesInCodeTag.txt │ │ │ │ │ ├── ParamWithGeneric.txt │ │ │ │ │ ├── Since.txt │ │ │ │ │ ├── AsteriskInJavadocInlineTag.txt │ │ │ │ │ ├── DollarInLink.txt │ │ │ │ │ ├── TwoLinkTagsInRow.txt │ │ │ │ │ ├── AuthorWithMailto.txt │ │ │ │ │ ├── NewlineAndAsteriskInParameters.txt │ │ │ │ │ ├── CustomJavadocTags.txt │ │ │ │ │ ├── LinkInlineTags.txt │ │ │ │ │ ├── FewWhiteSpacesAsSeparator.txt │ │ │ │ │ ├── JavadocTagDescriptionWithInlineTags.txt │ │ │ │ │ ├── SeeReferenceWithFewNestedClasses.txt │ │ │ │ │ ├── TextBeforeJavadocTags.txt │ │ │ │ │ ├── AllJavadocInlineTags.txt │ │ │ │ │ ├── DocRootInheritDoc.txt │ │ │ │ │ └── Serial.txt │ │ │ │ └── LeadingAsterisks.txt │ │ │ ├── LineCommentAtTheEndOfFile.java │ │ │ ├── InputGrammar.java │ │ │ ├── InputVararg.java │ │ │ ├── java8 │ │ │ │ ├── InputAnnotationsTest1.java │ │ │ │ └── InputDefaultMethodsTest2.java │ │ │ ├── InputJava7Diamond.java │ │ │ ├── Bug3553541.java │ │ │ ├── EofBug1667137.java │ │ │ ├── InputEmbeddedNullChar.java │ │ │ ├── InputHexFloat.java │ │ │ └── InputJava7StringSwitch.java │ │ │ ├── regexp.header1 │ │ │ ├── regexp.header │ │ │ ├── InputStartingWithEmptyLine.java │ │ │ ├── regexp.header2 │ │ │ ├── mycheckstyle.properties │ │ │ ├── inputHeader.java │ │ │ ├── annotation │ │ │ ├── package-info.java │ │ │ ├── AnnotationsUseStyleParams.java │ │ │ ├── SuppressWarningsValuePair.java │ │ │ ├── NotOverride.java │ │ │ └── SuppressWarningsConstants.java │ │ │ ├── InputMain.java │ │ │ ├── InputRegexpSmallHeader.java │ │ │ ├── InputRegexpHeader3.java │ │ │ ├── design │ │ │ ├── InputOneTopLevelEnum.java │ │ │ ├── InputOneTopLevelInterface.java │ │ │ ├── InputOneTopLevelClassNoPublic.java │ │ │ ├── HideUtilityClassConstructor.java │ │ │ ├── HideUtilityClassContructor3041574_2.java │ │ │ ├── HideUtilityClassContructor3041574_1.java │ │ │ ├── UtilityClassConstructorPrivate.java │ │ │ ├── UtilityClassConstructorPublic.java │ │ │ ├── InputOneTopLevelEnum2.java │ │ │ ├── InputOneTopLevelInterface2.java │ │ │ ├── UtilityClassConstructor.java │ │ │ ├── InputRegression1762702.java │ │ │ └── InputNonUtilityClass.java │ │ │ ├── InetSocketAddress.java │ │ │ ├── InputRegexpHeader4.java │ │ │ ├── imports │ │ │ ├── InputCustomImportOrder_NoImports.java │ │ │ ├── DOMSource.java │ │ │ ├── InputImportOrder_NoFailureForRedundantImports.java │ │ │ ├── import-control_broken.xml │ │ │ ├── InputCustomImportOrderNoValid.java │ │ │ ├── import-control_wrong.xml │ │ │ ├── InputImportControl.java │ │ │ ├── InputAvoidStaticImportNestedClass.java │ │ │ ├── InputCustomImportOrderImportsContainingJava.java │ │ │ ├── InputImportOrder_HonorsTokensProperty.java │ │ │ ├── InputImportOrderStaticGroupOrder.java │ │ │ ├── InputImportOrderStaticGroupOrderBottom.java │ │ │ ├── InputImportOrderStaticOnDemandGroupOrderBottom.java │ │ │ ├── InputImportOrderCaseInsensitive.java │ │ │ ├── InputImportOrderStaticOnDemandGroupOrder.java │ │ │ ├── InputImportBug.java │ │ │ ├── package-info.java │ │ │ ├── InputImportOrder_WildcardUnspecified.java │ │ │ ├── InputCustomImportOrderThirdPartyPackage.java │ │ │ ├── InputImportOrder_Wildcard.java │ │ │ ├── import-control_one.xml │ │ │ ├── InputCustomImportOrderThirdPartyAndSpecial.java │ │ │ ├── import-control_one-re.xml │ │ │ ├── InputCustomImportOrder2.java │ │ │ ├── InputCustomImportOrder3.java │ │ │ ├── InputCustomImportOrderTemp.java │ │ │ ├── import-control_two.xml │ │ │ ├── InputImportOrder_Above.java │ │ │ ├── InputImportOrder_Under.java │ │ │ ├── import-control_complete.xml │ │ │ ├── InputImportOrder_Bottom.java │ │ │ ├── InputImportOrder_Top.java │ │ │ ├── import-control_two-re.xml │ │ │ ├── InputImportOrder.java │ │ │ ├── InputImportOrder_InFlow.java │ │ │ ├── import-control_WithNewElement.xml │ │ │ └── InputCustomImportOrder.java │ │ │ ├── LocalAnnotations.java │ │ │ ├── whitespace │ │ │ ├── InputEmptyLineSeparatorFormerException.java │ │ │ ├── Gh47.java │ │ │ ├── InputEmptyLineSeparatorMultipleFieldsInClass.java │ │ │ ├── InputNoWhiteSpaceAfterCheckFormerNpe.java │ │ │ ├── InputEmptyLineSeparatorMultipleImportEmptyClass.java │ │ │ ├── InputDoWhileWhitespaceAround.java │ │ │ ├── InputGenericWhitespaceInnerClassCheck.java │ │ │ ├── InputSwitchWhitespaceAround.java │ │ │ ├── NoLineWrapGoodInput.java │ │ │ ├── ParenPadWithSpace.java │ │ │ ├── NoLineWrapBadInput.java │ │ │ └── InputWhitespaceAround.java │ │ │ ├── InputRegexpHeader1.java │ │ │ ├── comments │ │ │ ├── InputCommentsTest_1.java │ │ │ ├── InputCommentsTest_2.java │ │ │ └── InputFullOfBlockComments.java │ │ │ ├── java.header │ │ │ ├── indentation │ │ │ └── InputAnnotationDefinition.java │ │ │ ├── suppressions_none.xml │ │ │ ├── configs │ │ │ ├── included.xml │ │ │ ├── empty_configuration.xml │ │ │ ├── missing_config_parent.xml │ │ │ ├── missing_config_name.xml │ │ │ ├── missing_property_name.xml │ │ │ ├── missing_property_value.xml │ │ │ ├── including.xml │ │ │ ├── subdir │ │ │ │ └── including.xml │ │ │ └── custom_messages.xml │ │ │ ├── InputRightCurlyEmptyAbstractMethod.java │ │ │ ├── InputRegexpHeader2.java │ │ │ ├── suppressions_no_check.xml │ │ │ ├── suppressions_no_file.xml │ │ │ ├── naming │ │ │ ├── InputAbstractClassNameFormerFalsePositive.java │ │ │ ├── InputTypeName.java │ │ │ ├── InputConstantNames.java │ │ │ ├── InputMemberName.java │ │ │ ├── InputStaticVariableName.java │ │ │ ├── AbstractMultisetSetCountTester.java │ │ │ ├── InputAbstractClassName.java │ │ │ └── InputMethodNameOverridenMethods.java │ │ │ ├── suppressions_bad_int.xml │ │ │ ├── OuterTypeNumberCheckInput.java │ │ │ ├── InputImmutableStarImport2.java │ │ │ ├── AnnotatedVisibilitySameTypeName.java │ │ │ ├── IntMethodAnnotation.java │ │ │ ├── metrics │ │ │ └── InputBooleanExpressionComplexityNPE.java │ │ │ ├── app-dev.properties │ │ │ ├── app-stage.properties │ │ │ ├── messages_test.properties │ │ │ ├── messages_test_de.properties │ │ │ ├── config-Incorrect.xml │ │ │ ├── config-classname.xml │ │ │ ├── InputNewlineCrAtEndOfFile.java │ │ │ ├── config-classname-prop.xml │ │ │ ├── InputImmutableStarImport.java │ │ │ ├── suppressions_multiple.xml │ │ │ ├── InputNoNewlineAtEndOfFile.java │ │ │ ├── config-classname2-error.xml │ │ │ ├── config-classname2.xml │ │ │ ├── InputFinalParametersPrimitiveTypes.java │ │ │ ├── InputNewlineLfAtEndOfFile.java │ │ │ ├── InputMissingSwitchDefault.java │ │ │ ├── InputNewlineCrlfAtEndOfFile.java │ │ │ ├── MyAnnotation.java │ │ │ ├── InputImmutableSameTypeName.java │ │ │ ├── InputRightCurlyAnnotations.java │ │ │ ├── Input15Extensions.java │ │ │ ├── InputWriteTag2.java │ │ │ ├── InputNullModifiers.java │ │ │ ├── InputParameterNumberCheck.java │ │ │ ├── InputInterfaceIsType.java │ │ │ ├── InputWriteTag.java │ │ │ └── InputPublicImmutable.java │ ├── resources-noncompilable │ │ └── com │ │ │ └── puppycrawl │ │ │ └── tools │ │ │ └── checkstyle │ │ │ ├── coding │ │ │ ├── InputNoPackage.java │ │ │ ├── InputInnerAssignmentLambdaExpressions.java │ │ │ ├── InputDefaultComesLast2.java │ │ │ ├── InputIllegalInstantiationCheckTest2.java │ │ │ └── InputOneStatementPerLineCheck.java │ │ │ ├── InputStaticModifierInInterface.java │ │ │ ├── imports │ │ │ ├── InputImportOrder_MultiplePatternMatches.java │ │ │ ├── InputRedundantImportCheck_UnnamedPackage.java │ │ │ ├── InputCustomImportOrderSamePackage2.java │ │ │ ├── InputCustomImportOrderSamePackage.java │ │ │ └── InputDefaultPackage.java │ │ │ ├── InputModifier2.java │ │ │ ├── blocks │ │ │ └── InputSingleLineLambda.java │ │ │ ├── indentation │ │ │ └── NewHandlerTestInput.java │ │ │ ├── grammars │ │ │ ├── java8 │ │ │ │ ├── InputDefaultMethodsTest.java │ │ │ │ ├── InputLambdaTest18.java │ │ │ │ ├── InputAnnotationsTest2.java │ │ │ │ ├── InputLambdaTest6.java │ │ │ │ ├── InputLambdaTest1.java │ │ │ │ ├── InputLambdaTest4.java │ │ │ │ ├── InputAnnotationsTest5.java │ │ │ │ ├── InputLambdaTest5.java │ │ │ │ ├── InputLambdaTest7.java │ │ │ │ ├── InputAnnotationsTest4.java │ │ │ │ ├── InputAnnotationsTest3.java │ │ │ │ ├── InputAnnotationsTest6.java │ │ │ │ ├── InputAnnotationsTest9.java │ │ │ │ ├── InputAnnotationsTest7.java │ │ │ │ ├── InputLambdaTest14.java │ │ │ │ ├── InputLambdaTest2.java │ │ │ │ ├── InputLambdaTest10.java │ │ │ │ ├── InputLambdaTest11.java │ │ │ │ ├── InputLambdaTest3.java │ │ │ │ ├── InputLambdaTest8.java │ │ │ │ ├── InputLambdaTest9.java │ │ │ │ ├── InputLambdaTest12.java │ │ │ │ ├── InputMethodReferencesTest3.java │ │ │ │ ├── InputLambdaTest13.java │ │ │ │ ├── InputAnnotationsTest10.java │ │ │ │ ├── InputLambdaTest17.java │ │ │ │ ├── InputMethodReferencesTest2.java │ │ │ │ └── InputAnnotationsTest8.java │ │ │ └── SemicolonBetweenImports.java │ │ │ ├── whitespace │ │ │ └── InputGenericWhitespaceMethodRef.java │ │ │ ├── InputFinalInDefaultMethods.java │ │ │ └── naming │ │ │ └── InputFinalLocalVariableNameLambda.java │ └── java │ │ └── com │ │ └── puppycrawl │ │ └── tools │ │ └── checkstyle │ │ ├── checks │ │ ├── javadoc │ │ │ └── BadCls.java │ │ └── sizes │ │ │ └── MethodCountCheckInput2.java │ │ ├── BaseFileSetCheckTestSupport.java │ │ ├── DebugChecker.java │ │ └── DebugFilter.java ├── main │ └── resources │ │ └── com │ │ └── puppycrawl │ │ └── tools │ │ └── checkstyle │ │ ├── checks │ │ ├── annotation │ │ │ └── messages_es.properties │ │ ├── regexp │ │ │ ├── messages_ja.properties │ │ │ ├── messages_pt.properties │ │ │ ├── messages_fi.properties │ │ │ ├── messages_es.properties │ │ │ ├── messages_fr.properties │ │ │ ├── messages_tr.properties │ │ │ ├── messages_de.properties │ │ │ └── messages.properties │ │ ├── indentation │ │ │ ├── messages_fi.properties │ │ │ ├── messages_ja.properties │ │ │ ├── messages_de.properties │ │ │ ├── messages_es.properties │ │ │ ├── messages_pt.properties │ │ │ ├── messages_fr.properties │ │ │ ├── messages_tr.properties │ │ │ └── messages.properties │ │ ├── header │ │ │ ├── messages_ja.properties │ │ │ ├── messages.properties │ │ │ ├── messages_fi.properties │ │ │ ├── messages_de.properties │ │ │ ├── messages_pt.properties │ │ │ ├── messages_es.properties │ │ │ ├── messages_fr.properties │ │ │ └── messages_tr.properties │ │ ├── modifier │ │ │ ├── messages_ja.properties │ │ │ ├── messages_fi.properties │ │ │ ├── messages_pt.properties │ │ │ ├── messages.properties │ │ │ ├── messages_es.properties │ │ │ ├── messages_fr.properties │ │ │ ├── messages_de.properties │ │ │ └── messages_tr.properties │ │ ├── naming │ │ │ ├── messages_ja.properties │ │ │ ├── messages_fi.properties │ │ │ ├── messages_pt.properties │ │ │ ├── messages_es.properties │ │ │ ├── messages_fr.properties │ │ │ ├── messages.properties │ │ │ ├── messages_tr.properties │ │ │ └── messages_de.properties │ │ ├── messages_fi.properties │ │ ├── blocks │ │ │ ├── messages_ja.properties │ │ │ ├── messages_fi.properties │ │ │ ├── messages_pt.properties │ │ │ ├── messages_es.properties │ │ │ ├── messages_de.properties │ │ │ ├── messages_fr.properties │ │ │ ├── messages_tr.properties │ │ │ └── messages.properties │ │ ├── sizes │ │ │ ├── messages_fi.properties │ │ │ ├── messages_ja.properties │ │ │ ├── messages_pt.properties │ │ │ ├── messages_es.properties │ │ │ └── messages_fr.properties │ │ ├── imports │ │ │ ├── messages_fi.properties │ │ │ ├── messages_ja.properties │ │ │ ├── messages_es.properties │ │ │ ├── messages_pt.properties │ │ │ └── messages_fr.properties │ │ ├── design │ │ │ ├── messages_ja.properties │ │ │ ├── messages_fi.properties │ │ │ ├── messages_es.properties │ │ │ ├── messages_pt.properties │ │ │ └── messages.properties │ │ ├── whitespace │ │ │ ├── messages_ja.properties │ │ │ ├── messages_fi.properties │ │ │ ├── messages_pt.properties │ │ │ ├── messages_fr.properties │ │ │ └── messages_es.properties │ │ ├── messages_ja.properties │ │ ├── messages_pt.properties │ │ ├── javadoc │ │ │ ├── messages_fi.properties │ │ │ └── messages_ja.properties │ │ └── messages_es.properties │ │ ├── ant │ │ ├── checkstyle-ant-task.properties │ │ └── antlib.xml │ │ ├── messages_pt.properties │ │ ├── packages_1_0.dtd │ │ ├── messages.properties │ │ ├── messages_fi.properties │ │ ├── messages_es.properties │ │ ├── messages_fr.properties │ │ ├── messages_de.properties │ │ ├── messages_tr.properties │ │ ├── configuration_1_0.dtd │ │ ├── suppressions_1_0.dtd │ │ └── suppressions_1_1.dtd ├── site │ └── resources │ │ ├── images │ │ ├── logo.png │ │ ├── Filter.gif │ │ ├── anchor.png │ │ ├── ban_red.png │ │ ├── banner.jpg │ │ ├── favicon.ico │ │ ├── favicon.png │ │ ├── groups.png │ │ ├── ok_blue.png │ │ ├── sflogo.gif │ │ ├── ok_green.png │ │ ├── rss-long.png │ │ ├── AuditListener.gif │ │ ├── gui_screenshot.png │ │ ├── stackoverflow.jpeg │ │ ├── twitter_button.png │ │ ├── Google-Plus-Logo-120x38.png │ │ ├── checkstyle_logo_small_64.png │ │ ├── gui_screenshot_debug_idea.png │ │ ├── gui_screenshot_debug_eclipse.png │ │ ├── gui_screenshot_debug_netbeans.png │ │ ├── gui_screenshot_importing_idea.png │ │ ├── gui_screenshot_ut_select_idea.png │ │ ├── gui_screenshot_importing_eclipse.png │ │ ├── gui_screenshot_importing_idea1.png │ │ ├── gui_screenshot_select_check_idea.png │ │ ├── gui_screenshot_ut_select_eclipse.png │ │ ├── github_logo_social_coding_outlined.png │ │ ├── gui_screenshot_importing_netbeans.png │ │ ├── gui_screenshot_importing_netbeans1.png │ │ ├── gui_screenshot_ut_select_netbeans.png │ │ ├── gui_screenshot_select_check_eclipse.png │ │ └── gui_screenshot_select_check_netbeans.png │ │ ├── files │ │ └── suppressions_none.xml │ │ └── js │ │ ├── google-analytics.js │ │ └── anchors.js └── it │ └── resources │ └── com │ └── google │ └── checkstyle │ └── test │ ├── chapter5naming │ ├── rule521$packagenames │ │ └── PackageBadNameInput3.java │ ├── rule521_packagenames │ │ └── BadPackageNameInput2.java │ ├── rule521packagenames │ │ └── PackageNameInputGood.java │ ├── rule521packageNamesCamelCase │ │ └── PackageNameInputBad.java │ └── rule525nonconstantfieldnames │ │ └── MemberNameInput_Basic.java │ ├── chapter3filestructure │ ├── rule341onetoplevel │ │ ├── OneTopLevelClassBad2.java │ │ ├── OneTopLevelClassBad3.java │ │ └── OneTopLevelClassInputGood.java │ ├── rule332nolinewrap │ │ ├── NoLineWrap_Good.java │ │ └── NoLineWrap_Bad.java │ └── rule333orderingandsoacing │ │ ├── CustomImportOrderInput_3.java │ │ ├── CustomImportOrderInput_2.java │ │ └── CustomImportOrderInput_1.java │ ├── chapter7javadoc │ └── rule711generalform │ │ └── InputSingleLineJavadocCheckError.java │ ├── chapter2filebasic │ └── rule21filename │ │ ├── OuterTypeFilenameInput_2.java │ │ ├── OuterTypeFilenameInput_1.java │ │ └── OuterTypeFilenameInput_3.java │ └── chapter4formatting │ └── rule462horizontalwhitespace │ └── WhitespaceAroundnput_EmptyTypesAndCycles.java ├── .gitattributes ├── .gitignore └── config └── assembly-src.xml /src/test/resources/com/puppycrawl/tools/checkstyle/InputEmptyFile.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/test/resources/com/puppycrawl/tools/checkstyle/header/H2.properties: -------------------------------------------------------------------------------- 1 | x=y -------------------------------------------------------------------------------- /src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/bothfiles/package.html: -------------------------------------------------------------------------------- 1 | Ignored -------------------------------------------------------------------------------- /src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkghtml/package.html: -------------------------------------------------------------------------------- 1 | Ignored -------------------------------------------------------------------------------- /src/main/resources/com/puppycrawl/tools/checkstyle/checks/annotation/messages_es.properties: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputWithCommentOnly.java: -------------------------------------------------------------------------------- 1 | /* Comment only */ 2 | -------------------------------------------------------------------------------- /src/test/resources/com/puppycrawl/tools/checkstyle/grammars/javadoc/htmlTags/ClosedOtherTag.txt: -------------------------------------------------------------------------------- 1 |
2 | first paragraph 3 |
4 | second paragraph 5 |
-------------------------------------------------------------------------------- /src/site/resources/images/gui_screenshot_importing_eclipse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naver/checkstyle/master/src/site/resources/images/gui_screenshot_importing_eclipse.png -------------------------------------------------------------------------------- /src/site/resources/images/gui_screenshot_importing_idea1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naver/checkstyle/master/src/site/resources/images/gui_screenshot_importing_idea1.png -------------------------------------------------------------------------------- /src/site/resources/images/gui_screenshot_select_check_idea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naver/checkstyle/master/src/site/resources/images/gui_screenshot_select_check_idea.png -------------------------------------------------------------------------------- /src/site/resources/images/gui_screenshot_ut_select_eclipse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naver/checkstyle/master/src/site/resources/images/gui_screenshot_ut_select_eclipse.png -------------------------------------------------------------------------------- /src/test/resources/com/puppycrawl/tools/checkstyle/grammars/javadoc/htmlTags/UnclosedParagraphFollowedByJavadocTag.txt: -------------------------------------------------------------------------------- 1 |2 | text text 3 | @author Baratali -------------------------------------------------------------------------------- /src/test/resources/com/puppycrawl/tools/checkstyle/grammars/javadoc/javadocTags/CustomJavadocTags.txt: -------------------------------------------------------------------------------- 1 | * @myTag yes it is 2 | * @anotherTagWithoutParameter 3 | * @author I 4 | -------------------------------------------------------------------------------- /src/test/resources/com/puppycrawl/tools/checkstyle/grammars/javadoc/javadocTags/LinkInlineTags.txt: -------------------------------------------------------------------------------- 1 | {@link java.lang.Integer#valueOf} 2 | {@link java.lang.Integer#valueOf valueOf} -------------------------------------------------------------------------------- /src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkghtml/Ignored.java: -------------------------------------------------------------------------------- 1 | package com.puppycrawl.tools.checkstyle.javadoc.pkghtml; 2 | 3 | class Ignored 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /src/site/resources/images/github_logo_social_coding_outlined.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naver/checkstyle/master/src/site/resources/images/github_logo_social_coding_outlined.png -------------------------------------------------------------------------------- /src/site/resources/images/gui_screenshot_importing_netbeans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naver/checkstyle/master/src/site/resources/images/gui_screenshot_importing_netbeans.png -------------------------------------------------------------------------------- /src/site/resources/images/gui_screenshot_importing_netbeans1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naver/checkstyle/master/src/site/resources/images/gui_screenshot_importing_netbeans1.png -------------------------------------------------------------------------------- /src/site/resources/images/gui_screenshot_ut_select_netbeans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naver/checkstyle/master/src/site/resources/images/gui_screenshot_ut_select_netbeans.png -------------------------------------------------------------------------------- /src/test/resources/com/puppycrawl/tools/checkstyle/InputMain.java: -------------------------------------------------------------------------------- 1 | package com.puppycrawl.tools.checkstyle; 2 | 3 | public class InputMain { 4 | } 5 | class InputMainInner { 6 | } 7 | -------------------------------------------------------------------------------- /src/test/resources/com/puppycrawl/tools/checkstyle/grammars/javadoc/htmlTags/ListWithUnclosedItemInUnclosedParagraph.txt: -------------------------------------------------------------------------------- 1 |
2 |
3 | * Description of my class. 4 | *
5 | * Another line of text 6 | -------------------------------------------------------------------------------- /src/test/resources/com/puppycrawl/tools/checkstyle/grammars/javadoc/javadocTags/SeeReferenceWithFewNestedClasses.txt: -------------------------------------------------------------------------------- 1 | @see java.lang.Integer.Nested.AnotherNested#someMethod(String, int) Description of the link -------------------------------------------------------------------------------- /src/test/resources/com/puppycrawl/tools/checkstyle/grammars/javadoc/javadocTags/TextBeforeJavadocTags.txt: -------------------------------------------------------------------------------- 1 | 2 | * a b 3 | * c 4 | * @see Integer Int 5 | * @author Walter White 6 | * @author John Snow 7 | -------------------------------------------------------------------------------- /src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkginfo/invalidformat/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * blah blah 3 | */ 4 | package com.puppycrawl.tools.checkstyle.javadoc.pkginfo.invalidformat; 5 | -------------------------------------------------------------------------------- /src/test/resources/com/puppycrawl/tools/checkstyle/design/InputOneTopLevelEnum.java: -------------------------------------------------------------------------------- 1 | package com.puppycrawl.tools.checkstyle.design; 2 | 3 | public enum InputOneTopLevelEnum { 4 | VALUE1, VALUE2; 5 | } 6 | -------------------------------------------------------------------------------- /src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_fi.properties: -------------------------------------------------------------------------------- 1 | redundantModifier=Tarpeeton määrite: ''{0}'' 2 | mod.order=''{0}'' määrite rikkoo JLS:n suositusten mukaisesen järjestyksen. 3 | -------------------------------------------------------------------------------- /src/test/resources/com/puppycrawl/tools/checkstyle/InetSocketAddress.java: -------------------------------------------------------------------------------- 1 | package com.puppycrawl.tools.checkstyle; 2 | 3 | public class InetSocketAddress 4 | { 5 | class Arrays { 6 | 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/test/resources/com/puppycrawl/tools/checkstyle/InputRegexpHeader4.java: -------------------------------------------------------------------------------- 1 | package com.puppycrawl.tools.checkstyle; 2 | 3 | import java.awt.*; 4 | import java.awt.*; 5 | import java.awt.*; 6 | import java.awt.*; 7 | -------------------------------------------------------------------------------- /src/test/resources/com/puppycrawl/tools/checkstyle/grammars/javadoc/htmlTags/MixedCaseOfHtmlTags.txt: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
} {@literal } {@docRoot} {@inheritDoc} {@link A A class} {@linkplain A another link} {@value lang.Integer#MAX_VALUE}
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkginfo/invalidinherit/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * {@inheritDoc} Where are we inheriting from
3 | */
4 | package com.puppycrawl.tools.checkstyle.javadoc.pkginfo.invalidinherit;
5 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputEmptyLineSeparatorFormerException.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.whitespace;
2 |
3 | public class InputEmptyLineSeparatorFormerException
4 | {
5 |
6 | }
7 |
--------------------------------------------------------------------------------
/src/it/resources/com/google/checkstyle/test/chapter3filestructure/rule341onetoplevel/OneTopLevelClassBad2.java:
--------------------------------------------------------------------------------
1 | package com.google.checkstyle.test.chapter3filestructure.rule341onetoplevel;
2 |
3 | class Foo {} //ok
4 | enum FooEnum {} // warn
5 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_pt.properties:
--------------------------------------------------------------------------------
1 | header.mismatch=A linha não condiz com a linha de cabeçalho esperada ''{0}''.
2 | header.missing=Falta o cabeçalho - o ficheiro não tem linhas suficientes.
3 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_es.properties:
--------------------------------------------------------------------------------
1 | header.missing=Falta una cabecera - no hay líneas suficientes en el fichero.
2 | header.mismatch=La línea no coincide con la línea de cabecera esperada ''{0}''.
3 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/InputRegexpHeader1.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle;
2 |
3 | import java.awt.*;
4 |
5 | /**
6 | * Some doc.
7 | */
8 |
9 | public class InputRegexpHeader1
10 | {
11 | }
12 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/javadoc/javadocTags/DocRootInheritDoc.txt:
--------------------------------------------------------------------------------
1 |
2 | * {@docRoot}
3 | * {@docRoot }
4 | * {@docRoot
5 | * }
6 | * {@inheritDoc}
7 | * {@inheritDoc }
8 | * {@inheritDoc
9 | * }
10 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/ant/antlib.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_fr.properties:
--------------------------------------------------------------------------------
1 | header.missing=En-tête manquante - Le fichier ne contient pas assez de lignes.
2 | header.mismatch=La ligne ne correspond pas à la ligne d''en-tête attendue ''{0}''.
3 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_es.properties:
--------------------------------------------------------------------------------
1 | name.invalidPattern=El nombre ''{0}'' debe coincidir con el patrón ''{1}''.
2 | illegal.abstract.class.name=El nombre ''{0}'' debe coincidir con el patrón ''{1}''.
3 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputPackageDeclaration.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.coding;
2 |
3 | class InputPackageDeclaration {
4 | public String value;
5 |
6 | private void get(){
7 | }
8 | }
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/comments/InputCommentsTest_1.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.comments;
2 | public class /*
3 | i'mcomment567
4 | */
5 | InputCommentsTest_1
6 | { // comment to left curly brace
7 | }
8 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/InputBadTag.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.javadoc;
2 |
3 | /**
4 | * The following is a bad tag.
5 | * @mytag Hello
6 | */
7 | public class InputBadTag
8 | {
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/InputTestNumberFomatException.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.javadoc;
2 |
3 | /** - a' {@link EntityEntry} (by way of {@link #;}
*/
4 | class InputTestNumberFomatException{}
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputGrammar.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.grammars;
2 | /**
3 | * Input for grammar test.
4 | */
5 | public class InputGrammar
6 | {
7 | int ÃЯ = 1; // illegal, unless UTF-8
8 | }
9 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/Gh47.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.whitespace;
2 |
3 | import java.util.List;
4 |
5 | public class Gh47
6 | {
7 | public List[]> listOfListOFArrays;
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_de.properties:
--------------------------------------------------------------------------------
1 | indentation.error={0} bei Einrücktiefe {1} nicht an korrekter Einrücktiefe {2}
2 | indentation.child.error=Kind von {0} bei Einrücktiefe {1} nicht an korrekter Einrücktiefe {2}
3 |
4 |
--------------------------------------------------------------------------------
/src/site/resources/files/suppressions_none.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputOneTopLevelClassNoPublic.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.design;
2 |
3 | class InputOneTopLevelClassNoPublic
4 | {
5 |
6 | }
7 |
8 | class InputOneTopLevelClassNoPublic2
9 | {
10 |
11 | }
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_es.properties:
--------------------------------------------------------------------------------
1 | indentation.error={0} en el nivel de sangrado {1} no está al nivel correcto, {2}
2 | indentation.child.error={0} el descendiente en el nivel de sangrado {1} no está al nivel correcto, {2}
3 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_pt.properties:
--------------------------------------------------------------------------------
1 | indentation.error={0} no nível de indentação {1} não está na indentação correcta, {2}
2 | indentation.child.error=Filho de {0} no nível de indentação {1} não está na indentação correcta, {2}
3 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_fr.properties:
--------------------------------------------------------------------------------
1 | name.invalidPattern=Le nom ''{0}'' n''est pas conforme à l''expression ''{1}''.
2 | illegal.abstract.class.name=Le nom de la classe abstraite ''{0}'' n''est pas conforme à l''expression ''{1}''.
3 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/java.header:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // Test case file for checkstyle.
3 | // Created: 2001
4 | ////////////////////////////////////////////////////////////////////////////////
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputEmptyLineSeparatorMultipleFieldsInClass.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.whitespace;
2 |
3 | public class InputEmptyLineSeparatorMultipleFieldsInClass
4 | {
5 | int first;
6 | int second;
7 | }
8 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputAnnotationDefinition.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.indentation; //indent:0 exp:0
2 |
3 | @interface AnnotationDefinition { //indent:0 exp:0
4 | int value = 1; //indent:4 exp:4
5 | } //indent:0 exp:0
6 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_fr.properties:
--------------------------------------------------------------------------------
1 | indentation.error={0} au niveau d''indentation {1} n''est pas indenté correctement ({2})
2 | indentation.child.error=Le fils de {0} au niveau d''identation {1} n''est pas indenté correctement ({2})
3 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/design/HideUtilityClassConstructor.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.design;
2 |
3 | public class HideUtilityClassConstructor {
4 |
5 | protected HideUtilityClassConstructor() {
6 | //does nothing
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | /src/test/resources/com/puppycrawl/tools/checkstyle/InputNewlineLfAtEndOfFile.java eol=lf
2 | /src/test/resources/com/puppycrawl/tools/checkstyle/InputNewlineCrlfAtEndOfFile.java eol=crlf
3 | /src/test/resources/com/puppycrawl/tools/checkstyle/InputNewlineCrAtEndOfFile.java -text
4 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages.properties:
--------------------------------------------------------------------------------
1 | redundantModifier=Redundant ''{0}'' modifier.
2 | annotation.order=''{0}'' annotation modifier does not precede non-annotation modifiers.
3 |
4 | mod.order=''{0}'' modifier out of order with the JLS suggestions.
5 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputVararg.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.grammars;
2 |
3 | /**
4 | * Input for vararg test.
5 | */
6 | public class InputVararg
7 | {
8 | public static void main(String... args)
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_none.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_fi.properties:
--------------------------------------------------------------------------------
1 | noNewlineAtEOF=Tiedosto ei pääty rivinvaihtoon.
2 |
3 | todo.match=Kommentti on to-do formaatin ''{0}'' mukainen.
4 |
5 | upperEll=Pitää olla iso ''L''.
6 |
7 | translation.missingKey=Käännösavain ''{0}'' puuttuu.
8 |
9 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/InputStaticModifierInInterface.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | public interface InputStaticModifierInInterface
3 | {
4 | static int f()
5 | {
6 | int someName = 5;
7 | return someName;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/configs/included.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_NoFailureForRedundantImports.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.imports;
2 |
3 | import java.awt.Button;
4 | import java.awt.Button;
5 |
6 | public class InputImportOrder_NoFailureForRedundantImports {
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputNoWhiteSpaceAfterCheckFormerNpe.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.whitespace;
2 |
3 | public class InputNoWhiteSpaceAfterCheckFormerNpe
4 | {
5 | private int[] getSome() {
6 | return new int[4];
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/src/it/resources/com/google/checkstyle/test/chapter7javadoc/rule711generalform/InputSingleLineJavadocCheckError.java:
--------------------------------------------------------------------------------
1 | package com.google.checkstyle.test.chapter7javadoc.rule711generalform;
2 |
3 | public class InputSingleLineJavadocCheckError {
4 | /** {@customTag} */ //warn
5 | void bar() {}
6 | }
7 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/javadoc/javadocTags/Serial.txt:
--------------------------------------------------------------------------------
1 | @serial field description
2 | on few lines
3 | and even here
4 | @serial include
5 | @serial exclude
6 | @serialField myField myObjectStreamField description of my serial field
7 | @serialData The data-description documents
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/import-control_broken.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_tr.properties:
--------------------------------------------------------------------------------
1 | #Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
2 |
3 | header.mismatch = Satır, beklenen başlık satırı olan ''{0}'' ile eşleşmiyor.
4 | header.missing = Başlık eksik - dosyada yeterli satır yok.
5 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/InputRightCurlyEmptyAbstractMethod.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle;
2 | abstract class CharSequenceReader{
3 |
4 | abstract void moveTo(double deltaX, double deltaY);
5 |
6 | void foo() {
7 | while (true);
8 | }
9 | }
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrderNoValid.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.imports;
2 |
3 | import java.util.Map;
4 | import java.util.Map.Entry;
5 | import java.util.NoSuchElementException;
6 |
7 | public class InputCustomImportOrderNoValid {
8 | }
9 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputEmptyLineSeparatorMultipleImportEmptyClass.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.whitespace;
2 |
3 | import java.util.Calendar;
4 | import java.util.Date;
5 |
6 | public class InputEmptyLineSeparatorMultipleImportEmptyClass
7 | {
8 | }
9 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/InputRegexpHeader2.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle;
2 |
3 | import java.awt.*;
4 | import java.awt.event.*;
5 | import java.io.*;
6 |
7 | /**
8 | *
9 | * blah blah
10 | * @see foo
11 | */
12 | public class InputRegexpHeader2
13 | {
14 | }
15 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/import-control_wrong.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_es.properties:
--------------------------------------------------------------------------------
1 | redundantModifier=Modificador ''{0}'' redundante.
2 | annotation.order=El modificador de anotación ''{0}'' no precede a los modificadores normales.
3 |
4 | mod.order=Modificador ''{0}'' desordenado según las sugerencias de la JLS.
5 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/configs/empty_configuration.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/it/resources/com/google/checkstyle/test/chapter3filestructure/rule341onetoplevel/OneTopLevelClassBad3.java:
--------------------------------------------------------------------------------
1 | package com.google.checkstyle.test.chapter3filestructure.rule341onetoplevel;
2 |
3 | public enum OneTopLevelClassBad3 {} //ok
4 |
5 | interface FooIn {} // warn
6 |
7 | class FooClass {} // warn
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_MultiplePatternMatches.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.imports;
2 |
3 | import java.io.File;
4 |
5 | import org.*;
6 | import org.myOrgorgan.Test;
7 |
8 | public class InputImportOrder_WildcardUnspecified {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_fr.properties:
--------------------------------------------------------------------------------
1 | redundantModifier=Mot-clef ''{0}'' redondant.
2 |
3 | annotation.order=Le modificateur d''annotation ''{0}'' ne précède pas les autres modificateurs.
4 |
5 | mod.order=Le mot-clef ''{0}'' n''apparaît pas dans l''ordre préconisé par les JLS.
6 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/configs/missing_config_parent.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportControl.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.imports;
2 |
3 | import java.awt.Image;
4 | import javax.swing.border.*;
5 | import java.io.File;
6 | import static java.awt.Button.ABORT;
7 |
8 | public class InputImportControl
9 | {
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_no_check.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest1.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.grammars.java8;
2 |
3 | import java.util.List;
4 |
5 | public class InputAnnotationsTest1 {
6 |
7 | @NonNull
8 | List numbers;
9 |
10 | @interface NonNull {
11 |
12 | }
13 |
14 | }
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_no_file.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_de.properties:
--------------------------------------------------------------------------------
1 | redundantModifier=Überflüssiger Modifier ''{0}''.
2 | annotation.order=''{0}'' Annotation-Modifier sollte vor den anderen Modifiern stehen.
3 |
4 | mod.order=Modifier ''{0}'' weicht von der empfohlenen Modifier-Reihenfolge aus der Java-Sprachdefinition ab.
5 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/design/HideUtilityClassContructor3041574_2.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.design;
2 |
3 | import java.io.Serializable;
4 | /*input file*/
5 | public class HideUtilityClassContructor3041574_2 implements Serializable {
6 | private static final long serialVersionUID = 1L;
7 |
8 | }
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/messages.properties:
--------------------------------------------------------------------------------
1 | general.fileNotFound=File not found!
2 | general.exception=Got an exception - {0}
3 |
4 | #
5 | # for DefaultLogger.java
6 | #
7 | DefaultLogger.addException=Error auditing {0}
8 | DefaultLogger.auditStarted=Starting audit...
9 | DefaultLogger.auditFinished=Audit done.
10 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/InputModifier2.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle;
3 | import java.util.Comparator;
4 | public interface InputModifier2 extends Comparator {
5 | @Override
6 | default int compare(Integer a, Integer b) {
7 | return 0;
8 | }
9 | }
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/design/HideUtilityClassContructor3041574_1.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.design;
2 |
3 | import java.io.Serializable;
4 | /*input file*/
5 | public abstract class HideUtilityClassContructor3041574_1 implements Serializable {
6 | private static final long serialVersionUID = 1L;
7 |
8 | }
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/design/UtilityClassConstructorPrivate.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.design;
2 |
3 | public class UtilityClassConstructorPrivate {
4 | private UtilityClassConstructorPrivate() {}
5 |
6 | private static int value = 0;
7 | public static void foo (int val) { value = val;}
8 | }
9 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/design/UtilityClassConstructorPublic.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.design;
2 |
3 | public class UtilityClassConstructorPublic {
4 | public UtilityClassConstructorPublic() {}
5 |
6 | private static int value = 0;
7 | public static void foo (int val) { value = val;}
8 | }
9 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputAbstractClassNameFormerFalsePositive.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.naming;
2 |
3 | public class InputAbstractClassNameFormerFalsePositive
4 | {
5 | class Abstract {
6 |
7 | }
8 |
9 | class AbstractClass {
10 |
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputAvoidStaticImportNestedClass.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.imports;
2 |
3 | public class InputAvoidStaticImportNestedClass{
4 | public static Integer zero=0;
5 |
6 | public static class InnerClass {
7 | public static Integer one=1;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputTypeName.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.naming;
2 |
3 | class inputHeaderClass {
4 |
5 | public interface inputHeaderInterface {};
6 | //comment
7 | public enum inputHeaderEnum { one, two };
8 |
9 | public @interface inputHeaderAnnotation {};
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_bad_int.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputDoWhileWhitespaceAround.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.whitespace;
2 |
3 | public class InputDoWhileWhitespaceAround {
4 |
5 | public void doWhileTest(int n) {
6 | int k = 0;
7 | do {
8 | ++k;
9 | } while(k < n);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/OuterTypeNumberCheckInput.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle;
2 |
3 | /**Contains empty inner class for OuterTypeNumberCheckTest*/
4 | public class OuterTypeNumberCheckInput {
5 |
6 | /** Just empty inner class*/
7 | private class InnerClass {
8 | // Do nothing
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputOneTopLevelEnum2.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.design;
2 |
3 | enum InputOneTopLevelEnum2inner1 {
4 | VALUE1, VALUE2;
5 | }
6 |
7 | public enum InputOneTopLevelEnum2 {
8 | VALUE1, VALUE2;
9 | }
10 |
11 | enum InputOneTopLevelEnum2inner2 {
12 | VALUE1, VALUE2;
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/messages_fi.properties:
--------------------------------------------------------------------------------
1 | general.fileNotFound=Tiedostoa ei löydy!
2 | general.exception=Poikkeus - {0}
3 |
4 | #
5 | # for DefaultLogger.java
6 | #
7 | DefaultLogger.addException=Virhe {0}:n tarkistuksessa
8 | DefaultLogger.auditStarted=Aloitetaan tarkistus...
9 | DefaultLogger.auditFinished=Tarkistus valmis.
10 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/blocks/InputSingleLineLambda.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.blocks;
3 | public class InputSingleLineLambda {
4 |
5 | static Runnable r1 = ()->System.out.println("Hello world one!");
6 | static Runnable r2 = () -> System.out.println("Hello world two!");
7 | }
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/indentation/NewHandlerTestInput.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.indentation;
2 |
3 | /**
4 | *
5 | * @author IljaDubinin
6 | */
7 | public class NewHandlerTestInput
8 | {
9 |
10 | public static void test() {
11 | method(ArrayList::new);
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/InputImmutableStarImport2.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle;
2 |
3 | import com.google.common.collect.*;
4 | //config.immutableClassName=com.google.google.common.ImmutableSet
5 | public final class InputImmutableStarImport2
6 | {
7 | public final ImmutableSet set = null; // No warning here
8 | }
9 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputMissingCtor.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.coding;
2 |
3 | public class InputMissingCtor
4 | {
5 | }
6 | // we shouln't flag abstract classes
7 | abstract class AbstactClass {
8 | }
9 |
10 | // this class has ctor
11 | class CorrectClass {
12 | CorrectClass() {
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/comments/InputCommentsTest_2.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.comments;
2 | // my class
3 | class InputCommentsTest_2
4 | {
5 | /**
6 | * Lines method.
7 | *
8 | * @return string.
9 | */
10 | protected String line()
11 | {
12 | return null;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/configs/missing_config_name.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrderImportsContainingJava.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.imports;
2 |
3 | import java.io.File;
4 | import javax.lang.model.SourceVersion;
5 | import com.puppycrawl.tools.checkstyle.checks.javadoc.AbstractJavadocCheck;
6 |
7 | public class InputCustomImportOrderImportsContainingJava {}
8 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/messages_es.properties:
--------------------------------------------------------------------------------
1 | general.fileNotFound=¡Fichero no encontrado!
2 | general.exception=Ocurrió una excepción - {0}
3 |
4 | #
5 | # for DefaultLogger.java
6 | #
7 | DefaultLogger.addException=Error auditando {0}
8 | DefaultLogger.auditStarted=Comenzando auditoría...
9 | DefaultLogger.auditFinished=Auditoría concluida.
10 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/AnnotationsUseStyleParams.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.annotation;
2 |
3 | import java.lang.annotation.Retention;
4 | import java.lang.annotation.Target;
5 |
6 | public class AnnotationsUseStyleParams
7 | {
8 | @Target({})
9 | public @interface myAnn {
10 |
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/configs/missing_property_name.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/configs/missing_property_value.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_tr.properties:
--------------------------------------------------------------------------------
1 | #Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
2 |
3 | indentation.child.error = {0} ifadesi doğru hizalanmamış. Bulunduğu sütun {1}, olması gereken sütun {2}.
4 | indentation.error = {0} ifadesi doğru hizalanmamış. Bulunduğu sütun {1}, olması gereken sütun {2}.
5 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/messages_fr.properties:
--------------------------------------------------------------------------------
1 | general.fileNotFound=Fichier non trouvé !
2 | general.exception=Exception levée : {0}
3 |
4 | #
5 | # for DefaultLogger.java
6 | #
7 | DefaultLogger.addException=Une erreur est survenue {0}
8 | DefaultLogger.auditStarted=Début de la vérification...
9 | DefaultLogger.auditFinished=Vérification terminée.
10 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputOneTopLevelInterface2.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.design;
2 |
3 | interface InputOneTopLevelInterface2inner1 {
4 | int foo();
5 | }
6 |
7 | public interface InputOneTopLevelInterface2 {
8 | int foo();
9 | }
10 |
11 | interface InputOneTopLevelInterface2inner2 {
12 | int foo();
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/messages_de.properties:
--------------------------------------------------------------------------------
1 | general.fileNotFound=Datei nicht gefunden!
2 | general.exception=Folgende Ausnahme ist aufgetreten - {0}
3 |
4 | #
5 | # for DefaultLogger.java
6 | #
7 | DefaultLogger.addException=Fehler beim Prüfen von {0}
8 | DefaultLogger.auditStarted=Beginne Prüfung...
9 | DefaultLogger.auditFinished=Prüfung beendet.
10 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_HonorsTokensProperty.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.imports;
2 |
3 | import static javax.swing.WindowConstants.DISPOSE_ON_CLOSE;
4 | import static java.awt.Button.ABORT;
5 | import java.awt.Dialog;
6 | import java.awt.Button;
7 |
8 | public class InputImportOrder_HonorsTokensProperty {
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrderStaticGroupOrder.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.imports;
2 |
3 | import static java.lang.Math.abs;
4 | import static org.abego.treelayout.Configuration.AlignmentInLevel;
5 |
6 | import org.*;
7 |
8 | import java.util.Set;
9 |
10 | public class InputImportOrderStaticGroupOrder
11 | {
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputDefaultMethodsTest.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 | public interface InputDefaultMethodsTest {
4 |
5 | default public void doSomething(){
6 | System.out.println("Something done.");
7 | }
8 |
9 | public void doOneMoreThing();
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkginfo/valid/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * This is a valid package documentation. <--- See the period after the
3 | * first sentence.
4 | *
5 | *
6 | * hurray for javadocs in html
7 | *
8 | * with a legacy non-closed br element
9 | *
10 | */
11 | package com.puppycrawl.tools.checkstyle.javadoc.pkginfo.valid;
12 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_ja.properties:
--------------------------------------------------------------------------------
1 |
2 | block.empty=空の {0} ブロックです。
3 | block.nested=ネストしたブロックは避けてください。
4 | block.noStmt=少なくとも1文はあるはずです。
5 |
6 | line.alone=''{0}'' は独立した行にあるべきです。
7 | line.new=''{0}'' は新しい行にあるべきです。
8 | line.previous=''{0}'' は前の行にあるべきです。
9 | line.same=''{0}'' は同一行にあるべきです。
10 |
11 | needBraces=''{0}'' 文では '''{}''' を使用しなければなりません。
12 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_fi.properties:
--------------------------------------------------------------------------------
1 | maxLen.file=Tiedoston pituus on {0,number,integer} riviä (suurin sallittu on {1,number,integer}).
2 | maxLen.method=Metodin pituus on {0,number,integer} riviä (suurin sallittu on {1,number,integer}).
3 | maxLineLen=Rivi on pidempi kuin {0,number,integer} merkkiä.
4 | maxParam=Enemmän kuin {0,number,integer} parametriä.
5 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest18.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | import java.util.function.Predicate;
3 | public class InputLambdaTest19 {
4 |
5 | static Predicate isEqual(Object targetRef) {
6 | return (null == targetRef)
7 | ? null
8 | : object -> targetRef.equals(object);
9 | }
10 | }
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/imports/InputRedundantImportCheck_UnnamedPackage.java:
--------------------------------------------------------------------------------
1 | import java.util.List;
2 | import java.util.List;
3 | import java.util.Arrays;
4 | import java.lang.String;
5 | import static java.lang.Math.PI;
6 |
7 | public class InputRedundantImportCheck_UnnamedPackage
8 | {
9 | public static double pi=PI;
10 | public List myList;
11 | }
12 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/whitespace/InputGenericWhitespaceMethodRef.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.whitespace;
3 |
4 | public class InputGenericWhitespaceMethodRef
5 | {
6 | final Supplier> function = Optional::empty;
7 | final Supplier> function = Optional:: empty;
8 | }
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/AnnotatedVisibilitySameTypeName.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle;
2 |
3 | import org.junit.rules.TemporaryFolder;
4 |
5 | import com.puppycrawl.tools.checkstyle.LocalAnnotations.Rule;
6 |
7 | public class AnnotatedVisibilitySameTypeName
8 | {
9 | @Rule
10 | public TemporaryFolder publicJUnitRule = new TemporaryFolder();
11 | }
12 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputIllegalTypeStarImports.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.coding;
2 |
3 | import java.*;
4 | import java.util.*;
5 | import org.abego.treelayout.*;
6 | import com.*;
7 | //configuration "illegalClassNames": List
8 | public class InputIllegalTypeStarImports
9 | {
10 | List l = new LinkedList<>(); //WARNING
11 | }
12 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputRequireThis2.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.coding;
2 |
3 | public class InputRequireThis2 {
4 | private final int number = 1;
5 |
6 | public int check() {
7 | int sum = number;
8 | sum += other();
9 | return sum;
10 | }
11 |
12 | private int other() {
13 | return 0;
14 | }
15 | }
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrderStaticGroupOrderBottom.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.imports;
2 |
3 | import org.*;
4 |
5 | import java.util.Set;
6 |
7 | import static java.lang.Math.PI;
8 | import static org.abego.treelayout.Configuration.AlignmentInLevel;
9 |
10 | public class InputImportOrderStaticGroupOrderBottom
11 | {
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrderStaticOnDemandGroupOrderBottom.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.imports;
2 |
3 | import org.*;
4 |
5 | import java.util.Set;
6 |
7 | import static java.lang.Math.*;
8 | import static org.abego.treelayout.Configuration.*;
9 |
10 | public class InputImportOrderStaticOnDemandGroupOrderBottom
11 | {
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_tr.properties:
--------------------------------------------------------------------------------
1 | #Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
2 |
3 | annotation.order = ''{0}'' anotasyon niteleyicisi, anotasyon olmayan niteleyicilerden önce kullanılmalı.
4 |
5 | mod.order = ''{0}'' niteleyicisi, Java tarafından önerilen sırada değil.
6 |
7 | redundantModifier = Gereksiz ''{0}'' niteleyicisi.
8 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputConstantNames.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.naming;
2 |
3 | import java.io.ObjectStreamField;
4 |
5 | public class InputConstantNames
6 | {
7 | private static final long serialVersionUID = 1L; //should be ignored
8 | private static final ObjectStreamField[] serialPersistentFields = {}; // should be ignored too
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputGenericWhitespaceInnerClassCheck.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.whitespace;
2 |
3 | import java.util.List;
4 |
5 | public class InputGenericWhitespaceInnerClassCheck
6 | {
7 | private List.InnerClass> field;
8 |
9 | public class InnerClass {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/regexp/messages_tr.properties:
--------------------------------------------------------------------------------
1 | regexp.exceeded = Satır, geçersiz ''{0}'' kalıbıyla eşleşiyor.
2 | regexp.minimum = Dosya, ''{1}'' kalıbı için en az {0} eşleşme içermiyor.
3 |
4 | illegal.regexp = Satırda geçersiz bir kalıp var: ''{0}''.
5 | required.regexp = Dosyada olması gereken ''{0}'' kalıbı yok.
6 | duplicate.regexp = Tekrarlanmýþbir kalıp bulundu: ''{0}''.
7 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrderCaseInsensitive.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.imports;
2 |
3 | import java.io.File;
4 | import java.io.InputStream;
5 | import java.io.IOException;
6 | import java.io.Reader;
7 | import static java.io.InputStream.*;
8 | import static java.io.IOException.*;
9 |
10 | public class InputImportOrderCaseInsensitive {
11 | }
12 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrderStaticOnDemandGroupOrder.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.imports;
2 |
3 | import static java.lang.Math.*;
4 | import static org.abego.treelayout.Configuration.*;
5 |
6 | import org.*;
7 |
8 | import java.util.Set;
9 | import org.junit.Test;
10 |
11 | public class InputImportOrderStaticOnDemandGroupOrder
12 | {
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkginfo/annotation/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * This is a valid package documentation. <--- See the period after the
3 | * first sentence.
4 | *
5 | *
6 | * hurray for javadocs in html
7 | *
8 | * with a legacy non-closed br element
9 | *
10 | */
11 | @Deprecated
12 | package com.puppycrawl.tools.checkstyle.javadoc.pkginfo.annotation;
13 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/messages_tr.properties:
--------------------------------------------------------------------------------
1 | #Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
2 |
3 | DefaultLogger.addException = {0} denetlenirken hata oluştu.
4 | DefaultLogger.auditFinished = Denetleme tamamlandı.
5 | DefaultLogger.auditStarted = Denetleme başlıyor...
6 |
7 | general.exception = Bir istisna yakalandı - {0}
8 | general.fileNotFound = Dosya bulunamadı!
9 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportBug.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.imports;
2 |
3 | import java.net.URL;
4 |
5 | public class InputImportBug {
6 | //same as a class name
7 | private static String URL = "This is a String object";
8 |
9 | public InputImportBug() throws Exception {
10 | URL url = new URL("file://this.is.a.url.object");
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputMemberName.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.naming;
2 |
3 | public class InputMemberName
4 | {
5 | public int mPublic;
6 | protected int mProtected;
7 | int mPackage;//comment
8 | private int mPrivate;
9 |
10 | public int _public;
11 | protected int _protected;
12 | int _package;
13 | private int _private;
14 | }
15 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputSwitchWhitespaceAround.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.whitespace;
2 |
3 | public class InputSwitchWhitespaceAround {
4 |
5 | public void switchTest(int k) {
6 | switch(k) {
7 | default:
8 | break;
9 | }
10 | switch (k) {
11 | case 7:
12 | break;
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/NoLineWrapGoodInput.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.whitespace;
2 |
3 | import com.google.common.annotations.Beta;
4 |
5 | import javax.accessibility.AccessibleAttributeSequence;
6 | import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
7 |
8 | public class NoLineWrapGoodInput {
9 |
10 | public void fooMethod() {
11 | //
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_fi.properties:
--------------------------------------------------------------------------------
1 | import.avoidStar=Älä käytä import-muotoa ''.*'' - {0}.
2 | import.duplicate=Duplikaatti-import rivin {0,number,integer} kanssa - {1}.
3 | import.illegal=Import sääntöjenvastaisesta paketista - {0}.
4 | import.lang=Tarpeeton import java.lang-paketista - {0}.
5 | import.same=Tarpeeton import samasta paketista - {0}.
6 | import.unused=Käyttämätön import - {0}.
7 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/IntMethodAnnotation.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | @Retention(RetentionPolicy.RUNTIME)
9 | @Target(ElementType.METHOD)
10 | public @interface IntMethodAnnotation{
11 | int value();
12 | }
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/SemicolonBetweenImports.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.grammars;
2 |
3 | import java.util.Arrays;
4 | ;
5 | import java.util.ArrayList;
6 | /**
7 | * Compilable by javac, but noncompilable by eclipse due to
8 | * this bug
9 | */
10 | public class SemicolonBetweenImports
11 | {
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/metrics/InputBooleanExpressionComplexityNPE.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.metrics;
2 |
3 | public class InputBooleanExpressionComplexityNPE
4 | {
5 | static {
6 | try {
7 | System.out.println("a");
8 | } catch (IllegalStateException | IllegalArgumentException e) {
9 | throw new RuntimeException(e);
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/regexp/messages_de.properties:
--------------------------------------------------------------------------------
1 | regexp.exceeded=Zeile trifft auf das verbotene Muster ''{0}'' zu.
2 | regexp.minimum=Datei enthält weniger als die erforderlichen {0} Treffer für das Muster ''{1}''.
3 |
4 | illegal.regexp=Die Zeile entspricht dem verbotenen Muster ''{0}''.
5 | required.regexp=Keine Zeile entspricht dem Muster ''{0}''.
6 | duplicate.regexp=Duplikat gefunden nach dem Muster ''{0}''.
7 |
--------------------------------------------------------------------------------
/src/site/resources/js/google-analytics.js:
--------------------------------------------------------------------------------
1 |
2 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
3 | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
4 | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5 | })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
6 |
7 | ga('create', 'UA-63181194-1', 'auto');
8 | ga('send', 'pageview');
9 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/configs/including.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | ]>
8 |
9 |
10 |
11 | &includedConfig;
12 |
13 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/app-dev.properties:
--------------------------------------------------------------------------------
1 | # input file for TranslationCheck
2 |
3 | # a key that is available in all translations
4 | hello=Hallo
5 |
6 | # whitespace at end of key should be trimmed before comparing.
7 | # the german translation does not contain whitespace, no error should
8 | # be reported here
9 | cancel=Abbrechen
10 |
11 | # a key that is missing in german translation
12 | #only.english=only english
13 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/app-stage.properties:
--------------------------------------------------------------------------------
1 | # input file for TranslationCheck
2 |
3 | # a key that is available in all translations
4 | hello=Hello
5 |
6 | # whitespace at end of key should be trimmed before comparing.
7 | # the german translation does not contain whitespace, no error should
8 | # be reported here
9 | cancel = Cancel
10 |
11 | # a key that is missing in german translation
12 | only.english=only english
13 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/design/UtilityClassConstructor.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.design;
2 |
3 | public class UtilityClassConstructor {
4 | private static int value = 0;
5 | public static void foo (int val) { value = val;}
6 |
7 | public static class Inner {
8 | public int foo;
9 | }
10 |
11 | public static class Inner2 {
12 | public static int foo;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputJava7Diamond.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.grammars;
2 |
3 | import java.util.*;
4 |
5 | public class InputJava7Diamond {
6 | HashMap map = new HashMap();
7 | HashMap map2 = new HashMap<>();
8 | HashMap> map3 = new HashMap<>();
9 | ArrayList list = new ArrayList<>();
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputDefaultMethodsTest2.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.grammars.java8;
2 |
3 | public class InputDefaultMethodsTest2 {
4 |
5 | public void doSomething(){
6 | int a = 5;
7 | switch (a)
8 | {
9 | case 0:
10 | break;
11 |
12 | default:
13 | break;
14 |
15 | }
16 |
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputModifiedControlVariableEnhancedForLoopVariable.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.coding;
2 |
3 | public class InputModifiedControlVariableEnhancedForLoopVariable {
4 |
5 | public void method2()
6 | {
7 | final String[] lines = {"line1", "line2", "line3"};
8 | for (String line: lines) {
9 | line = line.trim();
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/configs/subdir/including.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | ]>
8 |
9 |
10 |
11 | &includedConfig;
12 |
13 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/package-info.java:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // Annotated package definition to check if import is declared unused
3 | // Created: 2005
4 | ////////////////////////////////////////////////////////////////////////////////
5 | @MyAnnotation
6 | package com.puppycrawl.tools.checkstyle.imports;
7 |
8 | import com.puppycrawl.tools.checkstyle.MyAnnotation;
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/messages_test.properties:
--------------------------------------------------------------------------------
1 | # input file for TranslationCheck
2 |
3 | # a key that is available in all translations
4 | hello=Hello
5 |
6 | # whitespace at end of key should be trimmed before comparing.
7 | # the german translation does not contain whitespace, no error should
8 | # be reported here
9 | cancel = Cancel
10 |
11 | # a key that is missing in german translation
12 | only.english=only english
13 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_ja.properties:
--------------------------------------------------------------------------------
1 | design.forExtension=メソッド ''{0}'' は拡張するように設計されていません - abstract か final か空である必要があります。
2 | final.class=クラス {0} は final として宣言すべきです。
3 | interface.type=インタフェースは型を記述するものであり、メソッドを持つべきです。
4 | variable.notPrivate=変数 ''{0}'' は private とし、アクセッサメソッドを持つべきです。
5 | mutable.exception=フィールド ''{0}'' は final 宣言しなければなりません。
6 | throws.count=throws の数が {0,number,integer} (最大 {1,number,integer} まで)です。
7 |
8 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest2.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Target;
5 |
6 | @Schedule
7 | public class InputAnnotationsTest2 {
8 |
9 |
10 | }
11 |
12 | @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
13 | @interface Schedule {
14 |
15 | }
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest6.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 | import java.util.Arrays;
4 | import java.util.List;
5 |
6 | public class InputLambdaTest6 {
7 |
8 | public void doSomething() {
9 | List numbers = Arrays.asList(1, 2, 3, 4, 5, 6);
10 |
11 | numbers.forEach((value) -> System.out.println(value));
12 | }
13 | }
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/Bug3553541.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.grammars;
2 |
3 | import java.util.List;
4 | import java.util.ArrayList;
5 |
6 | // Demonstrates the bug #3553541
7 | class Bug3553541
8 | {
9 | List super long[]> a;
10 | {
11 | a = new ArrayList();
12 | }
13 | List super Integer[]> b;
14 | {
15 | b = new ArrayList();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/messages_test_de.properties:
--------------------------------------------------------------------------------
1 | # input file for TranslationCheck
2 |
3 | # a key that is available in all translations
4 | hello=Hallo
5 |
6 | # whitespace at end of key should be trimmed before comparing.
7 | # the german translation does not contain whitespace, no error should
8 | # be reported here
9 | cancel=Abbrechen
10 |
11 | # a key that is missing in german translation
12 | #only.english=only english
13 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_ja.properties:
--------------------------------------------------------------------------------
1 | import.avoidStar=''.*'' 形式のインポートの使用は避けるべきです - {0}。
2 | import.duplicate={0,number,integer} 行目と重複するインポートです - {1}。
3 | import.illegal=不正なパッケージからのインポートです - {0}。
4 | import.lang=java.lang パッケージからのインポートは冗長です - {0}。
5 | import.same=同一パッケージからのインポートは冗長です - {0}。
6 | import.unused=使用されないインポートです - {0}。
7 | import.ordering=''{0}'' のインポート順序が間違っています。
8 | import.separation=''{0}'' は上のインポート文から1行空けるべきです。
9 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/coding/InputInnerAssignmentLambdaExpressions.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.coding;
3 |
4 | public class InputInnerAssignmentLambdaExpressions {
5 |
6 | private void setAction() {
7 | button.setOnAction(e -> pressed = true); //No violation here
8 | button.setOnAction(e -> { pressed = true; }); //No violation here
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest1.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 | public class InputLambdaTest1 {
4 |
5 | static Runnable r1 = ()->System.out.println("Hello world one!");
6 | static Runnable r2 = () -> System.out.println("Hello world two!");
7 |
8 | public static void main(String[] args) {
9 | r1.run();
10 | r2.run();
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest4.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 | import java.util.Arrays;
4 | import java.util.List;
5 |
6 | public class InputLambdaTest4 {
7 |
8 | public void doSomething() {
9 | List numbers = Arrays.asList(1, 2, 3, 4, 5, 6);
10 |
11 | numbers.forEach((Integer value) -> System.out.println(value));
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/EofBug1667137.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.grammars;
2 |
3 | // Demonstrates the bug #1667137
4 | class EofBug1667137 {
5 |
6 | void checkstyleIsBroken() {
7 | EofBug1667137 borkage = new EofBug1667137() {
8 |
9 | T borked(T brokenness) {
10 | return brokenness;
11 | }
12 | };
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_fi.properties:
--------------------------------------------------------------------------------
1 | block.empty=Tyhjä {0}-rakenne.
2 | block.nested=Avoid nested blocks.
3 | block.noStmt=Pitää olla ainakin yksi lause.
4 |
5 | line.alone=''{0}'' pitää olla yksinään rivillä.
6 | line.new=''{0}'' pitää olla uudella rivillä.
7 | line.previous=''{0}'' pitää olla edellisellä rivillä.
8 | line.same=''{0}'' pitää olla samalla rivillä.
9 |
10 | needBraces=''{0}''-rakenteen pitää käyttää '''{}'':a.
11 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages.properties:
--------------------------------------------------------------------------------
1 | name.invalidPattern=Name ''{0}'' must match pattern ''{1}''.
2 | illegal.abstract.class.name=Name ''{0}'' must match pattern ''{1}''.
3 | method.name.equals.class.name=Method Name ''{0}'' must not equal the enclosing class name.
4 | no.abstract.class.modifier=Class ''{0}'' must be declared as ''abstract''.
5 |
6 | abbreviation.as.word=Abbreviation in name must contain no more than ''{0}'' capital letters.
7 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest5.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Target;
5 |
6 |
7 | public class InputAnnotationsTest5 {
8 |
9 |
10 | void monitorTemperature() throws @Critical Exception { }
11 |
12 | @Target(ElementType.TYPE_USE)
13 | @interface Critical {
14 |
15 | }
16 | }
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest5.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 | import java.util.Arrays;
4 | import java.util.List;
5 |
6 |
7 | public class InputLambdaTest5 {
8 |
9 | public void doSomething() {
10 | List numbers = Arrays.asList(1, 2, 3, 4, 5, 6);
11 |
12 | numbers.forEach((Integer value) -> {System.out.println(value);});
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest7.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 | import java.util.Arrays;
4 | import java.util.List;
5 |
6 | public class InputLambdaTest7 {
7 |
8 | public void doSomething() {
9 | List numbers = Arrays.asList(1, 2, 3, 4, 5, 6);
10 |
11 | numbers.forEach((value) -> {
12 | System.out.println(value);
13 | });
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputEmbeddedNullChar.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.grammars;
2 |
3 | public class InputEmbeddedNullChar
4 | {
5 | public void doSomething()
6 | {
7 | // String below has an embedded null in it as well as char 036 repeated
8 | // twice - none of shich should cause a problem as they're all valid
9 | // UTF-8
10 | String cctCxlMsg = ":ET:OE:}} ";
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest4.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Target;
5 |
6 |
7 | public class InputAnnotationsTest4 {
8 |
9 | public static void methodName(@NotNull String args) {
10 |
11 | }
12 |
13 | @Target(ElementType.TYPE_USE)
14 | @interface NotNull {
15 |
16 | }
17 | }
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputHexFloat.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.grammars;
2 |
3 | /**
4 | * Input for hex float and double test.
5 | */
6 | public class InputHexFloat
7 | {
8 | double f1 = 0x.0P10;
9 | double f2 = 0x1.P-1;
10 | double f3 = 0Xab1P0;
11 | double f4 = 0Xab1ap+20;
12 | double f5 = 0Xab1ap+20D;
13 | double f6 = 0Xab1ap+20d;
14 | double f7 = 0Xab1ap+20f;
15 | double f8 = 0Xab1ap+20F;
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_pt.properties:
--------------------------------------------------------------------------------
1 | block.empty=Block {0} vazio.
2 | block.nested=Avoid nested blocks.
3 | block.noStmt=Tem que ter pelo menos uma instrução.
4 |
5 | line.alone=''{0}'' deve estar sozinho numa linha.
6 | line.new=''{0}'' deve estar numa nova linha.
7 | line.previous=''{0}'' deve estar na linha anterior.
8 | line.same=''{0}'' deve estar na mesma linha.
9 |
10 | needBraces=A estrutura sintáctica ''{0}'' deve utilizar '''{}'''s.
11 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_ja.properties:
--------------------------------------------------------------------------------
1 | containsTab=行にタブ文字が含まれています。
2 |
3 | line.alone=''{0}'' は独立した行にあるべきです。
4 | line.new=''{0}'' は新しい行にあるべきです。
5 | line.previous=''{0}'' は前の行にあるべきです。
6 | line.same=''{0}'' は同一行にあるべきです。
7 |
8 | ws.followed=''{0}'' の後にホワイトスペースがあります。
9 | ws.notFollowed=''{0}'' の後にホワイトスペースがありません。
10 | ws.notPreceded=''{0}'' の前にホワイトスペースがありません。
11 | ws.preceded=''{0}'' の前にホワイトスペースがあります。
12 | ws.typeCast=''型変換'' の後にホワイトスペースがありません。
13 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/config-Incorrect.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 | #
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/config-classname.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputStaticVariableName.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.naming;
2 |
3 | public class InputStaticVariableName {
4 |
5 | /** Interface fields should be skipped */
6 | interface A {
7 | public static int VAL_0 = 1;
8 | }
9 |
10 | /** Annotation fields should be skipped */
11 | @interface B {
12 | String name() default "";
13 | int version() default 0;
14 | public static int VAL_1 = 0;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/it/resources/com/google/checkstyle/test/chapter3filestructure/rule332nolinewrap/NoLineWrap_Good.java:
--------------------------------------------------------------------------------
1 | package com.google.checkstyle.test.chapter3filestructure.rule332nolinewrap; //ok
2 |
3 | import com.google.common.annotations.Beta; //ok
4 |
5 | import javax.accessibility.AccessibleAttributeSequence; //ok
6 | import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; //ok
7 |
8 | public class NoLineWrap_Good {
9 |
10 | public void fooMethod() {
11 | //
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_tr.properties:
--------------------------------------------------------------------------------
1 | #Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
2 |
3 | illegal.abstract.class.name = ''{0}'' ismi, şu kalıpta olmalı: ''{1}''.
4 |
5 | method.name.equals.class.name = ''{0}'' metodunun adı kendini kapsayan tür ile aynı olmamalı.
6 |
7 | name.invalidPattern = ''{0}'' ismi, şu kalıpta olmalı: ''{1}''.
8 |
9 | no.abstract.class.modifier = ''{0}'' sınıfı ''abstract'' olarak tanımlanmalı.
10 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_ja.properties:
--------------------------------------------------------------------------------
1 | executableStatementCount=実行文が {0,number,integer} あります(最大 {1,number,integer} まで)。
2 | maxLen.file=ファイルが {0,number,integer} 行あります(最大 {1,number,integer} 行まで)。
3 | maxLen.method=メソッドが {0,number,integer} 行あります(最大 {1,number,integer} 行まで)。
4 | maxLen.anonInner=無名インナークラスの長さが {0,number,integer} 行あります(最大 {1,number,integer} 行まで)。
5 | maxLineLen=行が {0,number,integer} 文字を超えています。
6 | maxParam=パラメータ数が {0,number,integer} を超えています。
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/InputNewlineCrAtEndOfFile.java:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
// Test case file for checkstyle.
// Created: 2015
////////////////////////////////////////////////////////////////////////////////
package com.puppycrawl.tools.checkstyle;
/**
* Test case for detection of an existing CR newline at EOF, using the
* NewlineAtEndOfFileCheck.
* @author Martin Steiger
**/
public interface InputNewlineCrAtEndOfFile
{
}
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/GuavaFP.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.javadoc;
2 |
3 | import com.google.common.base.Function;
4 |
5 | class Foo5 {
6 |
7 | /**
8 | * This class implements the GWT serialization of {@link HashMultimap}.
9 | *
10 | * @author Jord Sonneveld
11 | *
12 | */
13 | public static > Function valueOfFunction(
14 | Class enumClass) {
15 | return null;
16 | }
17 | }
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/SuppressWarningsValuePair.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.annotation;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | public class SuppressWarningsValuePair
7 | {
8 | public static final String UNCHECKED = "unchecked";
9 |
10 | public static void test() {
11 | @SuppressWarnings(value = UNCHECKED)
12 | final List dummyOne = (List) new ArrayList();
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/NotOverride.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.annotation;
2 |
3 | public class NotOverride
4 | {
5 | /**
6 | * {@inheritDoc}
7 | */
8 | private void bleh() {
9 |
10 | }
11 |
12 | /**
13 | * {@inheritDoc}
14 | */
15 | public static void eh() {
16 |
17 | }
18 |
19 | /**
20 | * {@inheritDoc}
21 | */
22 | public String junk = "";
23 |
24 | void dodoo() {}
25 | }
26 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputRegression1762702.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.design;
2 |
3 | /**
4 | * Input for HideUtilityClassConstructorCheck, a non utility class that has
5 | *
6 | * @author lkuehne
7 | */
8 | public class InputRegression1762702
9 | {
10 | public long constructionTime = System.currentTimeMillis();
11 |
12 | public static InputRegression1762702 create()
13 | {
14 | return new InputRegression1762702();
15 | }
16 | }
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/InputJavadocMethodIgnoreNameRegex.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.javadoc;
2 |
3 | public class InputJavadocMethodIgnoreNameRegex
4 | {
5 | private void foo() {
6 |
7 | }
8 |
9 | private void foo88() {
10 |
11 | }
12 |
13 | private void foo2() {
14 | int x = 0;
15 | int k = x >> 2;
16 | String s = String.valueOf(k);
17 | boolean b = false;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/InputSummaryJavadocCheckNoPeriod.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.javadoc;
2 |
3 | public class InputSummaryJavadocCheckNoPeriod
4 | {
5 | /**
6 | * As of JDK 1.1, replaced by {@link #setBounds(int,int,int,int)}
7 | */
8 | void foo3() {}
9 |
10 | /**
11 | * Blabla
12 | */
13 | void foo4() throws Exception {}
14 |
15 | /** An especially short bit of Javadoc */
16 | void foo5() {}
17 | }
18 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_es.properties:
--------------------------------------------------------------------------------
1 | block.empty=Bloque {0} vacío.
2 | block.nested=Evitar bloques anidados.
3 | block.noStmt=Debe tener al menos una sentencia.
4 |
5 | line.alone=''{0}'' debería estar solo en una línea.
6 | line.new=''{0}'' debería estar en una nueva línea.
7 | line.previous=''{0}'' debería estar en la línea anterior.
8 | line.same=''{0}'' debería estar en la misma línea.
9 |
10 | needBraces=La construcción ''{0}'' debe usar '''{}'' (llaves).
11 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/config-classname-prop.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_ja.properties:
--------------------------------------------------------------------------------
1 | noNewlineAtEOF=ファイルが新しい行で終了していません。
2 |
3 | todo.match=コメントが to-do の形式 ''{0}'' に合致しています。
4 |
5 | upperEll=大文字の ''L'' を使用すべきです。
6 |
7 | translation.missingKey=キー ''{0}'' がありません。
8 |
9 | missing.switch.default="default" 節の無い switch 文です。
10 |
11 | uncommented.main=コメントではない main メソッドが見つかりました。
12 |
13 | descendant.token.min=''{2}'' の子孫 ''{3}'' の数 {0} が最小数 {1} を満たしません。
14 | descendant.token.max=''{2}'' の子孫 ''{3}'' の数 {0} が最大数 {1} を超えています。
15 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/InputFinalInDefaultMethods.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | public interface MyInterface {
3 | final int k = 5; //WARNING
4 |
5 | default int defaultMethod(final int x) {
6 | if (k == 5) {
7 | final int t = 24; //No violation here!
8 | for (; ;) {
9 | final String s = "some"; //No violation here!
10 | }
11 | }
12 | final int square = x * x; //No violation here!
13 | return square;
14 | }
15 | }
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest3.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Target;
5 |
6 |
7 |
8 | public class InputAnnotationsTest3 {
9 |
10 | public static void methodName(Object str) {
11 | String myString = (@NonNull String) str;
12 | }
13 |
14 | @Target(ElementType.TYPE_USE)
15 | @interface NonNull {
16 | }
17 |
18 | }
--------------------------------------------------------------------------------
/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheckInput2.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.checks.sizes;
2 |
3 | public enum MethodCountCheckInput2 {
4 |
5 | RED {
6 | @Override void something() {};
7 | },
8 |
9 | BLUE {
10 | @Override void something() {};
11 | protected void other1() {};
12 | private void other2() {};
13 | };
14 |
15 | @Override public String toString() { return ""; };
16 |
17 | abstract void something();
18 | }
19 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/InputImmutableStarImport.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle;
2 |
3 | import com.puppycrawl.tools.checkstyle.InputImmutable;
4 | import com.puppycrawl.tools.checkstyle.InetSocketAddress.*;
5 |
6 | public final class InputImmutableStarImport
7 | {
8 | public final Arrays f = null; // If Arrays is specified as immutable class, no matter of canonical name
9 | // no warning will be here, star imports are out of consideration
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_WildcardUnspecified.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.imports;
2 |
3 | // groups are configured as follows
4 | // com.puppycrawl,*,java
5 | // the trailing javax.crypto.Cipher; should be flagged as an error.
6 |
7 | import java.io.File;
8 | import java.io.IOException;
9 | import java.util.Iterator;
10 |
11 | import com.puppycrawl.tools.checkstyle.imports.InputImportBug;
12 |
13 | public class InputImportOrder_WildcardUnspecified {
14 | }
15 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_fi.properties:
--------------------------------------------------------------------------------
1 | design.forExtension=Metodia ''{0}'' ei ole suunniteltu laajennettavaksi - pitäisi olla abstrakti, final tai tyhjä.
2 | final.class=Luokan {0} pitäisi olla final.
3 | interface.type=Rajapintojen pitäisi kuvata tyyppiä ja siten sisältää metodeja.
4 | variable.notPrivate=Muuttujan ''{0}'' pitää olla private ja sillä pitää olla accessorimetodit.
5 | throws.count=Heitettyjen poikkeusten lukumäärä on {0,number,integer} (suurin sallittu on {1,number,integer}).
6 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputIllegalThrowsCheckIgnoreOverriddenMethods.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.coding;
2 |
3 | public class InputIllegalThrowsCheckIgnoreOverriddenMethods
4 | extends InputIllegalThrowsCheck
5 | {
6 | @Override
7 | public void methodTwo() throws RuntimeException {
8 |
9 | }
10 |
11 | @java.lang.Override
12 | public java.lang.Throwable methodOne() throws RuntimeException {
13 | return null;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrderThirdPartyPackage.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.imports;
2 |
3 | import org.abego.treelayout.*;
4 |
5 | import org.junit.*;
6 |
7 | import java.*;
8 | import javax.swing.*;
9 |
10 | import static sun.tools.util.CommandLine.parse;
11 | import static sun.tools.util.ModifierFilter.ALL_ACCESS;
12 | import static sun.tools.util.ModifierFilter.ALL_ACCESS;
13 |
14 | public class InputCustomImportOrderThirdPartyPackage
15 | {
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_Wildcard.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.imports;
2 | // groups are configured as follows
3 | // com.puppycrawl,*,java
4 | // the trailing javax.crypto.Cipher; should be flagged as an error.
5 |
6 | import com.puppycrawl.tools.checkstyle.imports.InputImportOrder_Above;
7 | import javax.crypto.BadPaddingException;
8 | import java.util.List; //comment test
9 | import javax.crypto.Cipher;
10 |
11 | public class InputImportOrder_Wildcard {
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_de.properties:
--------------------------------------------------------------------------------
1 | name.invalidPattern=''{0}'' entspricht nicht dem Muster ''{1}''.
2 | illegal.abstract.class.name=Klassenname ''{0}'' entspricht nicht dem Muster ''{1}''.
3 | method.name.equals.class.name=Methodenname ''{0}'' darf nicht der gleiche sein wie der Name der Klasse.
4 | no.abstract.class.modifier=Die Klasse ''{0}'' muss ''abstract'' deklariert werden.
5 |
6 | abbreviation.as.word=Die Abkürzung in diesem Bezeichner darf höchstens aus ''{0}'' Großbuchstaben bestehen.
7 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest6.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 |
4 | import java.lang.annotation.ElementType;
5 | import java.lang.annotation.Target;
6 | import java.util.List;
7 |
8 | public class InputAnnotationsTest6 {
9 |
10 | abstract class UnmodifiableList implements @Readonly List<@Readonly T> {
11 | }
12 |
13 | @Target(ElementType.TYPE_USE)
14 | @interface Readonly {
15 |
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrderSamePackage2.java:
--------------------------------------------------------------------------------
1 | //Moved to noncompilable because UT requires imports from the same package
2 | package java.util.concurrent;
3 | import java.util.regex.Pattern;
4 | import java.util.List;
5 | import java.util.regex.Matcher;
6 | import java.util.StringTokenizer;
7 | import java.util.*;
8 | import java.util.concurrent.AbstractExecutorService;
9 | import java.util.concurrent.*;
10 |
11 | public class InputCustomImportOrderSamePackage2 {
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages.properties:
--------------------------------------------------------------------------------
1 | indentation.error.multi=''{0}'' have incorrect indentation level {1}, expected level should be one of the following: {2}.
2 | indentation.child.error.multi=''{0}'' child have incorrect indentation level {1}, expected level should be one of the following: {2}.
3 | indentation.error=''{0}'' have incorrect indentation level {1}, expected level should be {2}.
4 | indentation.child.error=''{0}'' child have incorrect indentation level {1}, expected level should be {2}.
5 |
--------------------------------------------------------------------------------
/src/test/java/com/puppycrawl/tools/checkstyle/BaseFileSetCheckTestSupport.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle;
2 |
3 | import com.puppycrawl.tools.checkstyle.api.Configuration;
4 |
5 | public class BaseFileSetCheckTestSupport extends BaseCheckTestSupport {
6 | @Override
7 | protected DefaultConfiguration createCheckerConfig(
8 | Configuration aCheckConfig) {
9 | final DefaultConfiguration dc = new DefaultConfiguration("root");
10 | dc.addChild(aCheckConfig);
11 | return dc;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_de.properties:
--------------------------------------------------------------------------------
1 | block.empty=Leerer {0}-Block.
2 | block.nested=Verschachtelte Blöcke sollten vermieden werden.
3 | block.noStmt=Muss mindestens ein Statement beinhalten.
4 |
5 | line.alone=''{0}'' sollte allein in der Zeile stehen.
6 | line.new=''{0}'' sollte in einer neuen Zeile stehen.
7 | line.previous=''{0}'' sollte in der vorhergehenden Zeile stehen.
8 | line.same=''{0}'' sollte in derselben Zeile stehen.
9 |
10 | needBraces=Das ''{0}''-Konstrukt muss '''{}''' benutzen.
11 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest9.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Target;
5 | import java.util.List;
6 |
7 | public class InputAnnotationsTest9 {
8 | public static void methodName(Object str) {
9 | List<@Immutable ? extends Comparable> unchangeable;
10 | }
11 |
12 | @Target(ElementType.TYPE_USE)
13 | @interface Immutable {
14 | }
15 | }
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/naming/AbstractMultisetSetCountTester.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.naming;
2 |
3 | public abstract class AbstractMultisetSetCountTester {
4 |
5 | private static final String SUPPORTS_REMOVE = "";
6 |
7 | @CollectionFeature.Require(absent = SUPPORTS_REMOVE)
8 | public void testSetCount_negative_removeUnsupported() {
9 | }
10 | }
11 |
12 | @interface CollectionFeature {
13 |
14 | public @interface Require
15 | {
16 | String absent();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/coding/InputDefaultComesLast2.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.coding;
3 | public interface JsonTranslator {
4 |
5 | String toJson(Response one, Response two, Response three);
6 |
7 | String toJson(Document document);
8 |
9 | default String toJson(Response one) {
10 | return toJson(one, one, one);
11 | }
12 |
13 | default String toJson(Response one, Response two) {
14 | return toJson(one, one, two);
15 | }
16 | }
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest7.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Target;
5 | import java.util.List;
6 |
7 | public class InputAnnotationsTest7 {
8 |
9 | public static void main(String[] args) {
10 | Object object = new @Interned Object();
11 |
12 | }
13 |
14 | @Target(ElementType.TYPE_USE)
15 | @interface Interned {
16 |
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_multiple.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/InputNoNewlineAtEndOfFile.java:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // Test case file for checkstyle.
3 | // Created: 2003
4 | ////////////////////////////////////////////////////////////////////////////////
5 | package com.puppycrawl.tools.checkstyle;
6 |
7 | /**
8 | * Test case for detection of missing newlines at EOF, using the
9 | * NewlineAtEndOfFileCheck.
10 | * @author Christopher Lenz
11 | **/
12 | public interface InputNoNewlineAtEndOfFile
13 | {
14 | }
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/config-classname2-error.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/config-classname2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_fr.properties:
--------------------------------------------------------------------------------
1 | block.empty=Bloc ''{0}'' vide.
2 | block.nested=Evitez d''imbriquer les blocs.
3 | block.noStmt=Le bloc devrait contenir au moins une instruction.
4 |
5 | line.alone=''{0}'' devrait être seul sur sa ligne.
6 | line.new=''{0}'' devrait être sur une nouvelle ligne.
7 | line.previous=''{0}'' devrait être sur la ligne précédente.
8 | line.same=''{0}'' devrait être sur la même ligne.
9 |
10 | needBraces=L''instruction ''{0}'' devrait utiliser des accolades ('''{''' et '''}''').
11 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/InputFinalParametersPrimitiveTypes.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle;
2 |
3 | public class InputFinalParametersPrimitiveTypes
4 | {
5 | void foo(int i) {} //no warning
6 | void foo1(int i, String k, float s) {} //no warning on 'i' and 's'
7 | void foo2(String s, Object o, long l) {} //no warning on 'l'
8 | void foo3(int[] array) {} //warning
9 | void foo4(int i, float x, int[] s) {} //warning on 's'
10 | void foo5(int x, long[] l, String s) {} //warning on 'l' and 's'
11 | }
12 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/import-control_one.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/InputNewlineLfAtEndOfFile.java:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // Test case file for checkstyle.
3 | // Created: 2015
4 | ////////////////////////////////////////////////////////////////////////////////
5 | package com.puppycrawl.tools.checkstyle;
6 |
7 | /**
8 | * Test case for detection of an existing LF newline at EOF, using the
9 | * NewlineAtEndOfFileCheck.
10 | * @author Martin Steiger
11 | **/
12 | public interface InputNewlineLfAtEndOfFile
13 | {
14 | }
15 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/ParenPadWithSpace.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.whitespace;
2 |
3 | public class ParenPadWithSpace
4 | {
5 | protected ParenPadWithSpace ( int i )
6 | {
7 | this ();
8 | toString ();
9 | }
10 | protected ParenPadWithSpace ()
11 | {
12 | super ();
13 | }
14 |
15 | public void enhancedFor ()
16 | {
17 | int[] i = new int[2];
18 | for ( int j: i ) {
19 | System.out.println ( j );
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_es.properties:
--------------------------------------------------------------------------------
1 | design.forExtension=El método ''{0}'' no está diseñado para ser extendido - necesita ser abstracto, final o vacío.
2 | final.class=La clase {0} debería declararse final.
3 | interface.type=Los interfaces deberían describir tipos y por tanto tener métodos.
4 | variable.notPrivate=La variable ''{0}'' debe ser privada y tener métodos de acceso.
5 | mutable.exception=El campo ''{0}'' debe declararse final.
6 | throws.count=El número de throws es {0,number,integer} (máximo permitido es {1,number,integer}).
7 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_pt.properties:
--------------------------------------------------------------------------------
1 | design.forExtension=O método ''{0}'' não foi concebido para extensão - precisa de ser abstracto, final ou vazio.
2 | final.class=A classe {0} deve ser declarada como final.
3 | interface.type=As interfaces devem descrever um tipo e portanto devem ter métodos.
4 | mutable.exception=O campo ''{0}'' deve ser declarado final.
5 | throws.count=O número de \"throws\" é {0,number,integer} (máx. permitido é {1,number,integer}).
6 | variable.notPrivate=Variável ''{0}'' deve ser privada e ter métodos acessores.
7 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_0.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
14 |
15 |
19 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest14.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 | import java.util.Arrays;
4 | import java.util.List;
5 |
6 |
7 | public class InputLambdaTest14 {
8 |
9 | public static void main(String args[]) {
10 | List numbers = Arrays.asList(1, 2, 3, 4, 5);
11 |
12 | numbers.forEach(first -> {
13 | System.out.println("first");
14 | System.out.println("second");
15 | System.out.println("third");
16 | });
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/InputMissingSwitchDefault.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle;
2 |
3 | public class InputMissingSwitchDefault {
4 | public void foo() {
5 | int i = 1;
6 | switch (i) {
7 | case 1: i++; break;
8 | case 2: i--; break;
9 | default: return;
10 | }
11 | }
12 | }
13 |
14 | class bad_test {
15 | public void foo() {
16 | int i = 1;
17 | switch (i) {
18 | case 1: i++; break;
19 | case 2: i--; break;
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputJava7StringSwitch.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.grammars;
2 |
3 | /**
4 | * Input for Java 7 String in Switch.
5 | */
6 | public class InputJava7StringSwitch
7 | {
8 | public static void main(String[] args) {
9 | String mystr = "value" + "2";
10 |
11 | switch (mystr) {
12 | case "value1":
13 | break;
14 | case "value2":
15 | break;
16 | default:
17 | break;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_es.properties:
--------------------------------------------------------------------------------
1 | import.avoidStar=Usar la importación con ''.*'' debería evitarse - {0}.
2 | import.duplicate=import duplicado en la línea {0,number,integer} - {1}.
3 | import.illegal=Importación de un paquete ilegal - {0}.
4 | import.lang=Importación redundante del paquete java.lang - {0}.
5 | import.same=Importación redundante del mismo paquete - {0}.
6 | import.unused=import no usado - {0}.
7 | import.ordering=Orden incorrecto para el import ''{0}''.
8 | import.separation=''{0}'' debería separarse de los import previos.
9 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/NoLineWrapBadInput.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.
2 | checkstyle.whitespace;
3 |
4 | import com.google.common.annotations.Beta;
5 |
6 | import javax.accessibility.
7 | AccessibleAttributeSequence;
8 | import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
9 |
10 | public class
11 | NoLineWrapBadInput {
12 |
13 | public void
14 | fooMethod() {
15 | final int
16 | foo = 0;
17 | }
18 | }
19 |
20 | enum
21 | FooFoo {
22 | }
23 |
24 | interface
25 | InterFoo {}
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/InputNewlineCrlfAtEndOfFile.java:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // Test case file for checkstyle.
3 | // Created: 2015
4 | ////////////////////////////////////////////////////////////////////////////////
5 | package com.puppycrawl.tools.checkstyle;
6 |
7 | /**
8 | * Test case for detection of an existing CRLF newline at EOF, using the
9 | * NewlineAtEndOfFileCheck.
10 | * @author Martin Steiger
11 | **/
12 | public interface InputNewlineCrlfAtEndOfFile
13 | {
14 | }
15 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_pt.properties:
--------------------------------------------------------------------------------
1 | import.avoidStar=A forma de importação ''.*'' deve ser evitada - {0}.
2 | import.duplicate=Importação duplicada na linha {0,number,integer}. - {1}.
3 | import.illegal=Importação de um pacote ilegal - {0}.
4 | import.lang=Importação redundande do pacote java.lang - {0}.
5 | import.same=Importação redundante do mesmo pacote - {0}.
6 | import.unused=Importação não utilizada - {0}.
7 | import.ordering=Ordenação incorrecta para a importação ''{0}''.
8 | import.separation=''{0}'' deve ser separado das importações anteriores.
9 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest2.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 | public class InputLambdaTest2 {
4 |
5 | public static void testVoidLambda(TestOfVoidLambdas test) {
6 | System.out.println("Method called");
7 | test.doSmth();
8 | }
9 |
10 |
11 | public static void main(String[] args) {
12 | testVoidLambda(() -> System.out.println("Method in interface called"));
13 | }
14 |
15 | private interface TestOfVoidLambdas {
16 |
17 | public void doSmth();
18 | }
19 | }
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputAbstractClassName.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.naming;
2 |
3 | abstract public class InputAbstractClassName {
4 | }
5 | // abstract --> ^Abstract.*$
6 | abstract class NonAbstractClassName {
7 | }
8 |
9 | abstract class AbstractClassOther {
10 | abstract class NonAbstractInnerClass {
11 | }
12 | }
13 |
14 | class NonAbstractClass {
15 | }
16 |
17 | //^Abstract.*$ --> abstract
18 | class AbstractClass {
19 | }
20 |
21 | abstract class AbstractClassName2 {
22 | class AbstractInnerClass {
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputIllegalThrowsCheck.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.coding;
2 | /** Input file */
3 | public class InputIllegalThrowsCheck {
4 |
5 | public void method() throws NullPointerException
6 | { // no code
7 | }
8 |
9 | public java.lang.Throwable methodOne() throws RuntimeException
10 | {
11 | return null;
12 | }
13 |
14 | public void methodTwo() throws java.lang.RuntimeException, java.lang.Error
15 | {
16 | }
17 |
18 | public void finalize() throws Throwable {
19 |
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_fi.properties:
--------------------------------------------------------------------------------
1 | containsTab=Rivi sisältää sarkainmerkin.
2 |
3 | line.alone=''{0}'' pitää olla yksinään rivillä.
4 | line.new=''{0}'' pitää olla uudella rivillä.
5 | line.previous=''{0}'' pitää olla edellisellä rivillä.
6 | line.same=''{0}'' pitää olla samalla rivillä.
7 |
8 | ws.followed=''{0}'':ta seuraa välilyönti.
9 | ws.notFollowed=''{0}'':ta ei seuraa välilyönti.
10 | ws.notPreceded=''{0}'':ta ei edellä välilyönti.
11 | ws.preceded=''{0}'':ta edeltää välilyönti.
12 | ws.typeCast=''tyypin muunnos'':ta ei seuraa välilyönti.
13 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest10.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 | public class InputLambdaTest10 {
4 |
5 | public static void testVoidLambda(TestOfVoidLambdas test) {
6 | System.out.println("Method called");
7 | test.doSmth("fef");
8 | }
9 |
10 |
11 | public static void main(String[] args) {
12 |
13 | testVoidLambda(s1 -> System.out.println(s1));
14 | }
15 |
16 | private interface TestOfVoidLambdas {
17 |
18 | public void doSmth(String first);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest11.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 | public class InputLambdaTest11 {
4 |
5 | public static void testVoidLambda(TestOfVoidLambdas test) {
6 | System.out.println("Method called");
7 | test.doSmth("fef");
8 | }
9 |
10 |
11 | public static void main(String[] args) {
12 |
13 | testVoidLambda(s1 -> {System.out.println(s1);});
14 | }
15 |
16 | private interface TestOfVoidLambdas {
17 |
18 | public void doSmth(String first);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrderThirdPartyAndSpecial.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.imports;
2 |
3 | import com.google.common.annotations.GwtCompatible;
4 | import com.google.common.annotations.Beta;
5 | import com.google.common.annotations.VisibleForTesting;
6 |
7 | import org.abego.treelayout.Configuration;
8 |
9 | import static sun.tools.util.ModifierFilter.ALL_ACCESS;
10 |
11 | import com.google.common.annotations.GwtCompatible;
12 |
13 | import antlr.*;
14 |
15 | public class InputCustomImportOrderThirdPartyAndSpecial
16 | {
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/InputSummaryJavadocCheckPeriod.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.javadoc;
2 |
3 | public class InputSummaryJavadocCheckPeriod
4 | {
5 | /**
6 | * As of JDK 1.1, replaced by {@link #setBounds(int,int,int,int)}
7 | */
8 | void foo3() {}
9 |
10 | /**
11 | * Blabla
12 | */
13 | void foo4() throws Exception {}
14 |
15 | /** An especially short bit of Javadoc_ */
16 | void foo5() {}
17 |
18 | /**
19 | * An especially short bit of Javadoc_
20 | */
21 | void foo6() {}
22 | }
23 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #Eclipse project files
2 | #.classpath till https://issues.apache.org/jira/browse/MECLIPSE-735
3 | #.project till https://issues.apache.org/jira/browse/MECLIPSE-735
4 | .settings
5 | .externalToolBuilders
6 | .classpath
7 | .project
8 |
9 | # Eclipse-CS Checkstyle Plug-In IDE configuration files
10 | .checkstyle
11 |
12 | #Netbeans project files
13 | nbactions.xml
14 | nb-configuration.xml
15 |
16 | #Maven build folder
17 | target
18 | bin
19 |
20 | #Idea project files
21 | checkstyle.iml
22 | .idea
23 |
24 | #Temp files
25 | *~
26 |
27 | #Virtual machine crash logs
28 | hs_err_pid*
29 | replay_pid*
30 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/regexp/messages.properties:
--------------------------------------------------------------------------------
1 | regexp.exceeded=Line matches the illegal pattern ''{0}''.
2 | regexp.minimum=File does not contain at least {0} matches for pattern ''{1}''.
3 |
4 | illegal.regexp=Line matches the illegal pattern ''{0}''.
5 | required.regexp=Required pattern ''{0}'' missing in file.
6 | duplicate.regexp=Found duplicate pattern ''{0}''.
7 |
8 | regexp.empty=Empty (null) pattern.
9 | regexp.StackOverflowError=java.util.regex.Matcher caused a java.lang.StackOverflowError for pattern ''{1}'' (you may be scanning a binary file instead of text?).
10 |
11 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_pt.properties:
--------------------------------------------------------------------------------
1 | descendant.token.max=Contagem de {0} para ''{2}'' descendente ''{3}'' é excede o número máximo {1}.
2 | descendant.token.min=Contagem de {0} para ''{2}'' descendente ''{3}'' é menos do que o número mínimo {1}.
3 | missing.switch.default=switch sem o ramo \"default\".
4 | noNewlineAtEOF=File does not end with a newline.
5 | todo.match=O comentário condiz com o padrão de tarefa pendente ''{0}''.
6 | translation.missingKey=Falta a chave ''{0}''.
7 | uncommented.main=Método main não comentado encontrado.
8 | upperEll=Deve ser utilizado um ''L'' maiúsculo.
9 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
13 |
17 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/MyAnnotation.java:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////////
2 | // Annotation for use by package definitions
3 | // Created: 2005
4 | ////////////////////////////////////////////////////////////////////////////////
5 | package com.puppycrawl.tools.checkstyle;
6 |
7 | import java.lang.annotation.Target;
8 | import java.lang.annotation.ElementType;
9 |
10 | /**
11 | * Annotation for use by package definitions
12 | * @author Michael Studman
13 | */
14 | @Target(value=ElementType.PACKAGE)
15 | public @interface MyAnnotation
16 | {
17 | }
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_tr.properties:
--------------------------------------------------------------------------------
1 | #Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
2 |
3 | block.empty = Boş blok bulundu: {0}
4 | block.nested = İç içe bloklar kullanılmamalıdır.
5 | block.noStmt = Blok en az bir ifade içermeli.
6 |
7 | line.alone = ''{0}'' ifadesi satırda tek başına olmalı.
8 | line.new = ''{0}'' ifadesi yeni satırda olmalı.
9 | line.previous = ''{0}'' ifadesi önceki satırda olmalı.
10 | line.same = ''{0}'' ifadesi aynı satırda olmalı.
11 |
12 | needBraces = ''{0}'' yapısı süslü parantezler ('''{}''') kullanmalı.
13 |
--------------------------------------------------------------------------------
/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_pt.properties:
--------------------------------------------------------------------------------
1 | executableStatementCount=Número de declarações executáveis é {0,number,integer} (máx. permitido são {1,number,integer}).
2 | maxLen.anonInner=Classe interna anóima tem {0,number,integer} linhas (máx. permitido são {1,number,integer}).
3 | maxLen.file=Ficheiro tem {0,number,integer} linhas (máx. permitido são {1,number,integer}).
4 | maxLen.method=Método tem {0,number,integer} linhas (máx. permitido são {1,number,integer}).
5 | maxLineLen=Linha contém mais do que {0,number,integer} caracteres.
6 | maxParam=Mais do que {0,number,integer} parâmetros.
7 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest3.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 | public class InputLambdaTest3 {
4 |
5 | public static void testVoidLambda(TestOfVoidLambdas test) {
6 | System.out.println("Method called");
7 | test.doSmth();
8 | }
9 |
10 |
11 | public static void main(String[] args) {
12 | testVoidLambda(() -> {
13 | System.out.println("Method in interface called");
14 | });
15 | }
16 |
17 | private interface TestOfVoidLambdas {
18 |
19 | public void doSmth();
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest8.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 | public class InputLambdaTest8 {
4 | public static void testVoidLambda(TestOfVoidLambdas test) {
5 | System.out.println("Method called");
6 | test.doSmth("fef", 2);
7 | }
8 |
9 |
10 | public static void main(String[] args) {
11 |
12 | testVoidLambda((s1, s2) -> System.out.println(s1 + s2));
13 | }
14 |
15 | private interface TestOfVoidLambdas {
16 |
17 | public void doSmth(String first, Integer second);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/naming/InputFinalLocalVariableNameLambda.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.naming;
3 |
4 | public class InputFinalLocalVariableNameLambda {
5 |
6 | private void addTotalValueOfOrder(final AugmentedOrder order) {
7 | final BigDecimal totalValueOfOrder = order.getTransactions().stream()
8 | .reduce(BigDecimal.ZERO,
9 | (t, u) -> t.add(u.getAmount()),
10 | BigDecimal::add);
11 | order.setTotalValueOfOrder(totalValueOfOrder.toPlainString());
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/imports/import-control_one-re.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest9.java:
--------------------------------------------------------------------------------
1 | //Compilable with Java8
2 | package com.puppycrawl.tools.checkstyle.grammars.java8;
3 | public class InputLambdaTest9 {
4 | public static void testVoidLambda(TestOfVoidLambdas test) {
5 | System.out.println("Method called");
6 | test.doSmth("fef", 2);
7 | }
8 |
9 |
10 | public static void main(String[] args) {
11 |
12 | testVoidLambda((s1, s2) -> {System.out.println(s1 + s2);});
13 | }
14 |
15 | private interface TestOfVoidLambdas {
16 |
17 | public void doSmth(String first, Integer second);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputFinalLocalVariableEnhancedForLoopVariable.java:
--------------------------------------------------------------------------------
1 | package com.puppycrawl.tools.checkstyle.coding;
2 |
3 | public class InputFinalLocalVariableEnhancedForLoopVariable {
4 | public void method1()
5 | {
6 | final java.util.List