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

sorted_imports rule is not caring about different import flavors #1269

Closed
m-revetria opened this issue Feb 1, 2017 · 1 comment
Closed
Labels
enhancement Ideas for improvements of existing features and rules. wontfix Issues that became stale and were auto-closed by a bot.

Comments

@m-revetria
Copy link

Imports can declare which kind of type wants to imports, see Import Declaration from Apple Docs. Additionally imports could be marked with @testable.

Personally I'd like having @testable at the end of imports list and grouping imports with kind declaration by kind after normal imports

  1. I would expect that next case don't throw.

    import UIKit
    @testable import MyApp
  2. I would expect that next case throws

    import AVKit
    import struct MyApp.MyStruct
    import enum MyApp.MyEnum
    import class Foundation.NSArray
    import UIKit
  3. Next case would be the valid version of previous case. Actually it is not throwing because sorted_imports rule is case sensitive. I would also expect it to be case insensitive as pointed out in this issue #1185

    import AVKit
    import UIKit
    import class Foundation.NSArray
    import class MyApp.MyClass
    import enum MyApp.MyEnum
    import struct MyApp.MyStruct
  4. I would expect next case don't throw

    import AVKit
    import test
    import class Foundation.NSArray
    @testable import MyApp
@stale
Copy link

stale bot commented Nov 8, 2020

This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions!

@stale stale bot added the wontfix Issues that became stale and were auto-closed by a bot. label Nov 8, 2020
@stale stale bot closed this as completed Nov 15, 2020
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. wontfix Issues that became stale and were auto-closed by a bot.
Projects
None yet
2 participants