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

Feature request: lexicographic sorting options for sorted_imports #4810

Open
2 tasks done
mildm8nnered opened this issue Mar 11, 2023 · 0 comments
Open
2 tasks done
Labels
enhancement Ideas for improvements of existing features and rules. good first issue Issue to be taken up by new contributors yet unfamiliar with the project.

Comments

@mildm8nnered
Copy link
Collaborator

New Issue Checklist

Describe the bug

import AppTypes
import AVFoundation
import Base
import Logging

Will pass sorted_imports, but swift-format's equivalent of this rule wants lexicographic sorting, and expects

import AppTypes
import Base
import Logging
import AVFoundation

It would be nice if SwiftLint offered a configuration option that preferred a sort order compatible with swift-format

Complete output when running SwiftLint, including the stack trace and command used

N/A

Environment

  • SwiftLint version (run swiftlint version to be sure)? 0.50.3
  • Installation method used (Homebrew, CocoaPods, building from source, etc)? Homebrew
  • Paste your configuration file:

none

no

  • Which Xcode version are you using (check xcodebuild -version)?
Xcode 14.2
Build version 14C18
  • Do you have a sample that shows the issue? Run echo "[string here]" | swiftlint lint --no-cache --use-stdin --enable-all-rules
    to quickly test if your example is really demonstrating the issue. If your example is more
    complex, you can use swiftlint lint --path [file here] --no-cache --enable-all-rules.

N/A

@SimplyDanny SimplyDanny added enhancement Ideas for improvements of existing features and rules. good first issue Issue to be taken up by new contributors yet unfamiliar with the project. labels Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Ideas for improvements of existing features and rules. good first issue Issue to be taken up by new contributors yet unfamiliar with the project.
Projects
None yet
Development

No branches or pull requests

2 participants