Revive excludedPaths by stopping double resolution#6825
Open
tomotakatakahashi wants to merge 1 commit into
Open
Revive excludedPaths by stopping double resolution#6825tomotakatakahashi wants to merge 1 commit into
tomotakatakahashi wants to merge 1 commit into
Conversation
Generated by 🚫 Danger |
tomotakatakahashi
marked this pull request as ready for review
July 15, 2026 14:56
This commit stops resolving a path to an absolute path in Configuration.groupFiles. This will resolve the issue mentioned in comments in realm#6795 that the "excluded" configuration in .swiftlint.yml is ignored when file paths are passed as arguments.
tomotakatakahashi
force-pushed
the
exclusion-ignored-6795
branch
from
July 15, 2026 14:59
3e1a6c8 to
40ce904
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This commit stops resolving a path to an absolute path in
Configuration.groupFiles. This will resolve the issue mentioned in comments in #6795 that theexcludedconfiguration in .swiftlint.yml is ignored when file paths are passed as arguments.Context
The
excludedconfiguration is sometimes ignored since v0.64.0 (#6795 (comment)). The issue seems to happen when file paths are passed as arguments (for example, runningswiftlint Foo.swift Bar.swiftinstead ofswiftlint .orswiftlint).Using a debugger, I found that
excludedRelativePathin the diff was actually not a relative path, because it had already been resolved in Configuration+Parsing.swift. As a result,let excludedPathin the diff was being doubly-resolved to an invalid path like"file:///Users/username/projects/foo/Users/username/projects/foo/MyPackage/Package.swift".Test
Arguments Passed On LaunchNoProblem.swift MyPackage/Package.swift, running the swiftlint scheme:Comment