diff --git a/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/OnlyFinalFieldsForImmutableClassCheck.java b/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/OnlyFinalFieldsForImmutableClassCheck.java index 85252a28a2149..916c7533859f3 100644 --- a/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/OnlyFinalFieldsForImmutableClassCheck.java +++ b/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/OnlyFinalFieldsForImmutableClassCheck.java @@ -1,5 +1,5 @@ -// Licensed under the MIT License. // Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. package com.azure.tools.checkstyle.checks; @@ -19,8 +19,8 @@ */ public class OnlyFinalFieldsForImmutableClassCheck extends AbstractCheck { private static final String IMMUTABLE_NOTATION = "Immutable"; - private static final String ERROR_MSG = "The variable field ''%s'' should be final." + - "Classes annotated with @Immutable are supposed to be immutable."; + private static final String ERROR_MSG = "The variable field ''%s'' should be final." + + "Classes annotated with @Immutable are supposed to be immutable."; private boolean hasImmutableAnnotation; diff --git a/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/ServiceClientBuilderCheck.java b/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/ServiceClientBuilderCheck.java index 8623828a9c63e..417643ccc4f8f 100644 --- a/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/ServiceClientBuilderCheck.java +++ b/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/ServiceClientBuilderCheck.java @@ -90,7 +90,7 @@ public void visitToken(DetailAST token) { // method name has prefix 'build' but not 'build*Client' or 'build*AsyncClient' if (!methodName.endsWith("Client")) { log(token, String.format( - "@ServiceClientBuilder class should not have a method name, ''%s'' starting with ''build'' but not ending with ''Client''." , methodName)); + "@ServiceClientBuilder class should not have a method name, ''%s'' starting with ''build'' but not ending with ''Client''.", methodName)); } break; default: diff --git a/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/Utils.java b/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/Utils.java index 5cc32d5249c2f..11ff09b1b760a 100644 --- a/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/Utils.java +++ b/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/Utils.java @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + package com.azure.tools.checkstyle.checks; import com.puppycrawl.tools.checkstyle.api.DetailAST; @@ -39,7 +42,7 @@ protected static boolean hasIllegalCombination(DetailAST modifiers) { Optional illegalCombination = TokenUtil.findFirstTokenByPredicate(modifiers, (node) -> { final int type = node.getType(); return INVALID_FINAL_COMBINATION.contains(node.getType()) || (TokenTypes.ANNOTATION == type - && INVALID_FINAL_ANNOTATIONS.contains(node.findFirstToken(TokenTypes.IDENT).getText())); + && INVALID_FINAL_ANNOTATIONS.contains(node.findFirstToken(TokenTypes.IDENT).getText())); }); return illegalCombination.isPresent(); diff --git a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml index 553c34ca080fe..916cd16a77969 100755 --- a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml +++ b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml @@ -112,6 +112,9 @@ + + +