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

Excluded syntax not working anymore in 0.58.0 #5953

Closed
2 tasks done
dtodereanfourthline opened this issue Jan 13, 2025 · 10 comments · Fixed by #5962
Closed
2 tasks done

Excluded syntax not working anymore in 0.58.0 #5953

dtodereanfourthline opened this issue Jan 13, 2025 · 10 comments · Fixed by #5962
Milestone

Comments

@dtodereanfourthline
Copy link

dtodereanfourthline commented Jan 13, 2025

New Issue Checklist

Bug Description

We are using swiftlint in our project for years. In the .swiftlint.yml file we were excluding some folders.
In the latest release this doesn't work anymore and swiftlint tries to correct all files from the ThirdParty folders.

excluded:
  - "ThirdParty/**"
  - "*/ThirdParty/**"
  - "**/ThirdParty/**"

Mention the command or other SwiftLint integration method that caused the issue. Include stack traces or command output.

  swiftlint --fix --config "../.swiftlint.yml"
  swiftlint --no-cache --config "../.swiftlint.yml"

Environment

  • SwiftLint version: 0.58.0
  • Xcode version: Xcode 16.2 Build version 16C5013f
  • Installation method used: Homebrew
  • Configuration file:
excluded:
  - "ThirdParty/**"
  - "*/ThirdParty/**"
  - "**/ThirdParty/**"
@bilalb
Copy link

bilalb commented Jan 13, 2025

Same here

@timath98
Copy link

Same here too :'(

@SimplyDanny SimplyDanny pinned this issue Jan 13, 2025
@SimplyDanny
Copy link
Collaborator

SimplyDanny commented Jan 13, 2025

What is a typical file path that gets linted while it shouldn't?

Please also provide your include and exclude patterns together with the command you are executing (like @dtodereanfourthline did).

@dtodereanfourthline
Copy link
Author

dtodereanfourthline commented Jan 14, 2025

example file path MyProject/ThirdParty/Lottie/Private/Model/DotLottie/ZipFoundation/Archive+Writing.swift. Literally everything under ThirdParty, thousands of files.

@lucasecf
Copy link

I'm affected by this as well.

excluded files:

excluded:
  - Generated
  - <package-name>/Sources/<package-name>/Services/Networking/GraphQL/Generated/*
  - "**/Package.swift"

command:
swiftlint lint <workspace-path> --config <workspace-path>/.swiftlint.yml --quiet --reporter json

What's funny is that I cannot reproduce locally, not sure why - on my machine, the files are properly excluded, but on CI they are not (both cases using 0.58.0 and using same command), so hundreds or warnings are reported there

@dtodereanfourthline
Copy link
Author

My team has just observed that if we add the following syntax, everything works. So this means that most probably wildcards are not working anymore in the latest release.

excluded:
  - MyProject/ThirdParty

@SimplyDanny
Copy link
Collaborator

For the time being, I've reverted the change that was causing the regression. File filtering will hopefully work as normal again in 0.58.1.

@bilalb
Copy link

bilalb commented Jan 16, 2025

Thank you @SimplyDanny
When can we expect 0.58.1 to be available via Homebrew?

@dtodereanfourthline
Copy link
Author

Thank you! :)

@SimplyDanny
Copy link
Collaborator

Thank you @SimplyDanny When can we expect 0.58.1 to be available via Homebrew?

There you go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants