This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
I finally found some time to fork and publish a new version of Scalastyle.
See the release notes and the following thread for more details.
This PR updates Scalastyle to the new version. Here are the changes as far as the rules repository and the quality profiles in SonarQube are concerned:
New Scalastyle rules:
ForLoopChecker
rule - omit braces if you have ayield
clause, otherwise, surround the contents with curly-braces, even if the contents are only a single line.WhileBraceChecker
- rule - it's recommended to never omit braces when usingwhile
.CaseBraceChecker
rule - braces aren't required incase
clauses.Scalastyle rule changes:
HeaderMatchesChecker
has new parameterregex
to indicate whether to treat the header string as a regular expression; defaults tofalse
MethodLengthChecker
has new parameterignoreEmpty
to exclude empty lines from being counted; defaults tofalse
ForBraceChecker
has a new parametersingleLineAllowed
to indicate whether a one-linefor
expressions with parentheses are allowed.NonASCIICharacterChecker
has a new parameterallowStringLiterals
to indicate whether non-ASCII scripts in string literals should be allowed.It's getting difficult to keep track of the count of how many templates, non-template rules and template instances there are, so this diff of the generated inspections file between 1.0 and 1.1 was really useful in figuring that out.
Closes #16.