Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency com.github.liancheng:organize-imports to v0.6.0 #100

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Nov 2, 2024

This PR contains the following updates:

Package Update New value References Sourcegraph
com.github.liancheng:organize-imports minor 0.6.0 source code search for "com.github.liancheng:organize-imports"

Test plan: CI should pass with updated dependencies. No review required: this is an automated dependency update PR.


Release Notes

liancheng/scalafix-organize-imports (com.github.liancheng:organize-imports)

v0.6.0

Compare Source

v0.5.0: OrganizeImports v0.5.0

Compare Source

This release features better compatibility with IntelliJ Scala plugin 2020.3 and contains breaking changes.

Changes

Breaking changes

  • The default value of the groups option is changed to ["*", "re:(javax?|scala)\\."] to align with IntelliJ Scala plugin 2020.3

Features

  • Add preset styles, including one for IntelliJ IDEA 2020.3 (#​154)

    Two preset styles are added:

    • DEFAULT

      An opinionated style recommended for new projects. The OrganizeImports rule tries its best to ensure correctness in all cases when possible. This default style aligns with this principal. In addition, by setting groupedImports to Explode, this style is also more friendly to version control and less likely to create annoying merge conflicts caused by trivial import changes.

      OrganizeImports {
        blankLines = Auto
        coalesceToWildcardImportThreshold = null
        expandRelative = false
        groupExplicitlyImportedImplicitsSeparately = false
        groupedImports = Explode
        groups = [
          "*"
          "re:(javax?|scala)\\."
        ]
        importSelectorsOrder = Ascii
        importsOrder = Ascii
        preset = DEFAULT
        removeUnused = true
      }
      
    • INTELLIJ_2020_3

      A style that is compatible with the default configuration of IntelliJ Scala plugin 2020.3. It is mostly useful for adding OrganizeImports to existing projects developed using the IntelliJ Scala plugin. However, this configuration may introduce subtle correctness issues (so does the default configuration of the IntelliJ Scala plugin). Please see the coalesceToWildcardImportThreshold option for more details.

      OrganizeImports {
        blankLines = Auto
        coalesceToWildcardImportThreshold = 5
        expandRelative = false
        groupExplicitlyImportedImplicitsSeparately = false
        groupedImports = Merge
        groups = [
          "*"
          "re:(javax?|scala)\\."
        ]
        importSelectorsOrder = Ascii
        importsOrder = Ascii
        preset = INTELLIJ_2020_3
        removeUnused = true
      }
      
  • Allow customizing blank lines between organized import groups (#​142)

    The IntelliJ Scala import optimizer not only allows you group imports but also allows you to decide whether a blank line should be inserted between two adjacent import groups. This feature introduces a new configuration option blankLines. When it's set to Manual, you may configure blank lines by adding "---" to the groups option. For example, now you can have the following configuration to group java, javax, and scala imports together without blank lines:

    OrganizeImports {
      blankLines = Manual
      groups = [
        "*"
        "---"
        "java."
        "javax."
        "scala."
      ]
    }
    

    By default, blankLines is set to Auto, which preserves the original behavior, i.e., a blank line is automatically inserted between adjacent import groups.

    This makes migrating IntelliJ Scala import optimizer configurations of existing projects to OrganizeImports easier.

Bug fixes

  • Renames and wildcard should not be separated (#​151)
  • Fix importer order when sorting by ASCII (#​149)

Acknowledgement

Many thanks to the following users and contributors for their valuable feedback and contributions!


Configuration

📅 Schedule: Branch creation - "on the 1st through 7th day of the month" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the bot label Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants