Skip to content

Files

Latest commit

 

History

History
49 lines (38 loc) · 2.23 KB

ScalaDoc.md

File metadata and controls

49 lines (38 loc) · 2.23 KB

Pattern: Malformed Scaladoc

Issue: -

Description

It is important to provide documentation for all packages, classes, traits, methods, and other members. Scaladoc generally follows the conventions of Javadoc, however there are many additional features to make writing scaladoc simpler.

In general, you want to worry more about substance and writing style than in formatting. Scaladocs need to be useful to new users of the code as well as experienced users.

Parameters

NameDescriptionTypeDefault Value
ignoreRegex Regular expression string ^$
ignoreTokenTypes Comma Separated String string ^$
ignoreOverride Ignore override boolean false
indentStyle Force indent style string anydoc

Ignore tokens is a comma separated string that may include the following : PatDefOrDcl (variables), TmplDef (classes, traits), TypeDefOrDcl (type definitions), FunDefOrDcl (functions). Supported indentation styles are scaladoc (for Scaladoc-style comments, with two spaces before the asterisk), javadoc (for JavaDoc-style comments, with a single space before the asterisk) or anydoc to support any style (any number of spaces before the asterisk). For backwards compatibility, if left empty, anydoc will be assumed.

Example configuration

<check enabled="true" class="org.scalastyle.scalariform.ScalaDocChecker" level="warning">
 <parameters>
  <parameter name="ignoreRegex">(.*Spec$)|(.*SpecIT$)</parameter>
  <parameter name="ignoreTokenTypes">PatDefOrDcl,TypeDefOrDcl,FunDefOrDcl,TmplDef</parameter>
  <parameter name="ignoreOverride">false</parameter>
  <parameter name="indentStyle">anydoc</parameter>
 </parameters>
</check>