Skip to content

Commit

Permalink
Issue checkstyle#12326: Resolve Pitest suppression for AccessModifier…
Browse files Browse the repository at this point in the history
…Option
  • Loading branch information
ThatSneakyCoder committed Nov 20, 2022
1 parent 1cd0b57 commit c7b0c4c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
Expand Up @@ -209,6 +209,15 @@ public void testScopeInnerInterfacesPublic() throws Exception {
getPath("InputJavadocMethodScopeInnerInterfaces.java"), expected);
}

@Test
public void testTrimProperty() throws Exception {
final String[] expected = {
"27: " + getCheckMessage(MSG_RETURN_EXPECTED),
};
verifyWithInlineConfigParser(
getPath("InputJavadocMethodAccessModifier.java"), expected);
}

@Test
public void testScopeAnonInnerPrivate() throws Exception {
final String[] expected = CommonUtil.EMPTY_STRING_ARRAY;
Expand Down
@@ -0,0 +1,30 @@
/*
JavadocMethod
allowedAnnotations = (default)Override
validateThrows = (default)false
accessModifiers = \tpublic
allowMissingParamTags = (default)false
allowMissingReturnTag = (default)false
tokens = (default)METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF, COMPACT_CTOR_DEF
*/

package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocmethod;

public class InputJavadocMethodAccessModifier {
class classOne {

}

class classTwo {

}

/**
* @return
*/
public String method1() { // violation '@return tag should be present and have description'
return "arbitrary_string";
}
}

0 comments on commit c7b0c4c

Please sign in to comment.