Skip to content

file_types_order stopped working with partial order set #5755

@username0x0a

Description

@username0x0a

New Issue Checklist

Bug Description

Previously (with 0.53.0) we had the file_types_order configured like this:

file_types_order:
  order: [[SwiftLintFramework.FileType.mainType], [SwiftLintFramework.FileType.previewProvider]]

so that it only checks that the main SwiftUI type is preceding its related PreviewProvider type.

Now after updating to 0.56.1 I just noticed the values naming in the order parameter changed, so I simply updated the config with this setup:

file_types_order:
  order: [[main_type], [preview_provider]]

which should be equivalent to the previous one in new terms. Yet I'm getting a ton of warnings related to other types (like f.e. extensions between classes, structs or whatever) not defined in our configuration. I find this breaking & I'd love to continue using this rule to just check the order of the specified subset of type identifiers.

Curiously, I can't seem to find any note on a change in the changelog diff in the first place so I can't really say when exactly this change happened.

Environment

  • SwiftLint version: 0.56.1 (updating from 0.53.0)
  • Xcode version: Xcode 15 (unrelated, replicable in CLI)
  • Installation method: Homebrew

Metadata

Metadata

Assignees

No one assigned

    Labels

    repro-neededIssues that cannot be reproduced or miss proper descriptive examples.staleIssues that did not receive responses from non-maintainers within a time frame.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions