scalacenter / scalafix

Refactoring and linting tool for Scala

Home Page:https://scalacenter.github.io/scalafix/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OrganizeImports with coalesceToWildcardImportThreshold > 0 uses wildcard pattern "_" instead of "*" in Scala 3

longliveenduro opened this issue · comments

I use coalesceToWildcardImportThreshold but the generated groups have the _ wildcard instead of the * wildcard of Scala 3 which I use in my project

Syntax of wildcard is currently preserved (see this and this), so I assume you are referring to the wildcards generated by coalesceToWildcardImportThreshold, which you expect to be * in Scala 3 (and Scala 2 with -Xsource:3?), but _ otherwise?

@bjaglin Thanks for coming back to this. Yes you are right.

I use coalesceToWildcardImportThreshold but the generated groups have the _ wildcard instead of the * wildcard of Scala 3.

I have updated the desciption, thanks for the heads up.

@longliveenduro I am about to introduce a new configuration flag in #1896 to address that, let me know what you think

@bjaglin That is a big PR. Where is the relevant part for this issue?

@longliveenduro The PR is the fix for this issue, nothing more. I understand the implementation is a bit technical, so I was only asking for your feedback on the UI - namely what's documented in the first markdown file appearing in the diff.

@bjaglin Thanks for your reply. That would do the job for me. LGTM. Thanks!