Documentation issues and better doc metrics reporting for Java

DeepSource now reports doc coverage issues in Java. We also report doc metrics more accurately now.

Doc metrics issues

This new release for Java brings four new issues for reporting doc coverage related issues:

  • JAVA-D1000 - Reported for undocumented class declarations.
  • JAVA-D1001 - Reported for undocumented methods.
  • JAVA-D1002 - Reported for undocumented constructors.
  • JAVA-D1003 - Reported for miscellaneous undocumented declarations (like enums and annotation interfaces)

Configuring doc issues

You can configure how DeepSource reports doc issues for Java through its corresponding meta option, skip_doc_coverage.

name = "java"
enabled = true

  runtime_version = 11
  skip_doc_coverage = [ "nonpublic" ]

The skip_doc_coverage field is an array which accepts any of the following values:

  • class - Ignore class documentation coverage (including enums and annotation types)
  • constructor - Ignore constructor documentation coverage
  • nonpublic - Ignore documentation coverage for any declaration not marked as public
  • test - Ignore documentation coverage within tests.
    • This includes anything the Java analyzer recognises as a test file, as well as anything specified under test_files or test_patterns.

DeepSource will exclude tests from doc coverage by default:

  skip_doc_coverage = [ "test" ]

If you wish to skip nothing, just set this field to an empty array:

  skip_doc_coverage = [ ]

Note that if you override this field, default behavior will be ignored. Remember to specify explicitly what items will be ignored by doc coverage.