Skip to content

@mwz mwz released this Jan 11, 2020 · 9 commits to master since this release

Updated Scalastyle to v1.1.0, which brings the following changes:
New Scalastyle rules:

  • New ForLoopChecker rule - omit braces if you have a yield clause, otherwise, surround the contents with curly-braces, even if the contents are only a single line.
  • New WhileBraceChecker rule - it's recommended to never omit braces when using while.
  • New CaseBraceChecker rule - braces aren't required in case clauses.

Scalastyle rule changes:

  • HeaderMatchesChecker has a new parameter regex to indicate whether to treat the header string as a regular expression; defaults to false.
  • MethodLengthChecker has a new parameter ignoreEmpty to exclude empty lines from being counted; defaults to false.
  • ForBraceChecker has a new parameter singleLineAllowed to indicate whether a one-line for expressions with parentheses are allowed; defaults to false.
  • NonASCIICharacterChecker has a new parameter allowStringLiterals to indicate whether non-ASCII scripts in string literals should be allowed; defaults to false.

All of the above rules are activated with the default parameter values in the Scalastyle, Scalastyle+Scapegoat and the Recommended by sonar-scala quality profiles.

(#342 - @mwz)

The plugin is available for download from Bintray.

Assets 2
You can’t perform that action at this time.