ソースを参照

Checkstyle: don't require javadoc on test methods (#88179)

Test methods tend to have descriptive names for the cases that they are
testing. Sometimes they require javadoc, for sure, but not often enough
to add a little "WEAK WARNING" marker on every single test method in my
IDE.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Nik Everett 3 年 前
コミット
aa6f31fe61

+ 1 - 1
build-tools-internal/src/main/resources/checkstyle_ide_fragment.xml

@@ -16,7 +16,7 @@
         <!-- Exclude short methods from this check - we don't want to have to document getters -->
         <property name="minLineCount" value="5" />
         <property name="allowedAnnotations" value="Override,Before,BeforeClass,After,AfterClass,Inject,TaskAction" />
-        <property name="ignoreMethodNamesRegex" value="^main$"/>
+        <property name="ignoreMethodNamesRegex" value="^(main|test.*)$"/>
         <message key="javadoc.missing" value="Public methods should be documented." />
     </module>