You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe this is a bug because it seems to contradict the lexicographic parameter's documentation:
* - lexicographic: if true, imports are ordered lexicographically (classes, wildcards, then
* packages; case-sensitive ordering within);
It also disagrees with tools such as scalafmt - and having scalafmt and scalastyle disagreeing on how things should be ordered is not fun.
I'm happy to submit a PR for this issue - it looks like a simple omission in compareNames in the case isImport=false, which ignores the value of lexicographic and will always compareIgnoreCase.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Have a file containing the following import statement:
And run scalastyle with the following configuration:
Expected behaviour
Scalastyle should not find an issue
Observed behaviour
Scalastyle complains:
Notes
I believe this is a bug because it seems to contradict the
lexicographic
parameter's documentation:It also disagrees with tools such as scalafmt - and having scalafmt and scalastyle disagreeing on how things should be ordered is not fun.
I'm happy to submit a PR for this issue - it looks like a simple omission in
compareNames
in the caseisImport=false
, which ignores the value oflexicographic
and will alwayscompareIgnoreCase
.The text was updated successfully, but these errors were encountered: