Skip to content

Revive excludedPaths by stopping double resolution - #6825

Open
tomotakatakahashi wants to merge 1 commit into
realm:mainfrom
tomotakatakahashi:exclusion-ignored-6795
Open

tomotakatakahashi wants to merge 1 commit into
realm:mainfrom
tomotakatakahashi:exclusion-ignored-6795

Conversation

@tomotakatakahashi

@tomotakatakahashi tomotakatakahashi commented Jul 15, 2026 •

Copy link
Copy Markdown

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 the excluded configuration in .swiftlint.yml is ignored when file paths are passed as arguments.

Context

The excluded configuration 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.swift instead of swiftlint . or swiftlint).

Using a debugger, I found that excludedRelativePath in the diff was actually not a relative path, because it had already been resolved in Configuration+Parsing.swift. As a result, let excludedPath in the diff was being doubly-resolved to an invalid path like "file:///Users/username/projects/foo/Users/username/projects/foo/MyPackage/Package.swift".

Test

  • With this reproduction setup and with Arguments Passed On Launch NoProblem.swift MyPackage/Package.swift, running the swiftlint scheme:
    • Before this PR: Failed
    • After this PR: Succeeded
  • nestedConfigurationBasicWithCommandLine
    • fails with main branch's Source
    • passes with this branch's Source
  • wildCardPatternCountWithCommandLine fails with both main and this branch

Comment

  • I couldn't find an appropriate place to put unit tests. Any suggestions would be appreciated.
    • Tests are added ConfigPathResolutionTests as I was advised.
  • I'm new to this codebase. Sorry if something is wrong.
  • wildCardPatternCountWithCommandLine is not actually related to this change. I add this test just to note a remaining bug.

@SwiftLintBot

SwiftLintBot commented Jul 15, 2026 •

Copy link
Copy Markdown
10594 Messages
📖 Building this branch resulted in the same binary size as when built on main.
📖 Linting Aerial with this PR took 0.67 s vs 0.68 s on main (1% faster).
📖 Linting Alamofire with this PR took 0.97 s vs 0.97 s on main (0% slower).
📖 Linting Brave with this PR took 5.47 s vs 5.44 s on main (0% slower).
📖 Linting Brigade with this PR took 18.04 s vs 18.25 s on main (1% faster).
📖 Linting DuckDuckGo with this PR took 34.06 s vs 34.11 s on main (0% faster).
📖 Linting Firefox with this PR took 12.06 s vs 12.0 s on main (0% slower).
📖 Linting Kickstarter with this PR took 7.37 s vs 7.36 s on main (0% slower).
📖 Linting Moya with this PR took 0.38 s vs 0.38 s on main (0% slower).
📖 Linting NetNewsWire with this PR took 2.61 s vs 2.63 s on main (0% faster).
📖 Linting Nimble with this PR took 0.56 s vs 0.56 s on main (0% slower).
📖 Linting PocketCasts with this PR took 7.53 s vs 7.46 s on main (0% slower).
📖 Linting Quick with this PR took 0.36 s vs 0.37 s on main (2% faster).
📖 Linting Realm with this PR took 3.0 s vs 2.95 s on main (1% slower).
📖 Linting Sourcery with this PR took 1.56 s vs 1.62 s on main (3% faster).
📖 Linting Swift with this PR took 4.64 s vs 4.63 s on main (0% slower).
📖 Linting SwiftLintPerformanceTests with this PR took 0.18 s vs 0.18 s on main (0% slower).
📖 Linting VLC with this PR took 1.47 s vs 1.47 s on main (0% slower).
📖 Linting Wire with this PR took 16.8 s vs 16.85 s on main (0% faster).
📖 Linting WordPress with this PR took 10.75 s vs 10.71 s on main (0% slower).
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:146:13: Warning: Conditional statements should always return on the next line (conditional_returns_on_newline)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:199:9: Warning: Conditional statements should always return on the next line (conditional_returns_on_newline)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:214:9: Warning: Conditional statements should always return on the next line (conditional_returns_on_newline)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:215:9: Warning: Conditional statements should always return on the next line (conditional_returns_on_newline)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:227:13: Warning: Conditional statements should always return on the next line (conditional_returns_on_newline)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:239:13: Warning: Conditional statements should always return on the next line (conditional_returns_on_newline)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:22:57: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:29:34: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:30:21: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:46:31: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:49:43: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:53:59: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:57:12: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:63:27: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:68:52: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:69:61: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:76:12: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:80:17: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:85:50: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:86:61: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:93:12: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:96:17: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:99:27: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:105:59: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:106:61: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:114:12: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:118:39: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:122:17: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:127:93: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:128:24: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:140:43: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:146:134: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:148:16: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:150:31: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:157:81: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:168:44: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:172:69: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:176:113: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:183:101: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:186:76: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:197:41: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:198:41: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:199:33: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:207:36: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:213:54: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:214:38: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:215:42: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:224:36: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:225:52: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:226:53: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:227:80: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:235:44: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:238:39: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:239:80: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:248:27: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:249:70: Warning: Opening brace should be on a separate line (contrasted_opening_brace)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:19:1: Warning: All declarations should specify Access Control Level keywords explicitly (explicit_acl)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:20:1: Warning: All declarations should specify Access Control Level keywords explicitly (explicit_acl)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:22:1: Warning: All declarations should specify Access Control Level keywords explicitly (explicit_acl)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:29:5: Warning: All declarations should specify Access Control Level keywords explicitly (explicit_acl)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:47:12: Warning: All declarations should specify Access Control Level keywords explicitly (explicit_acl)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:48:12: Warning: All declarations should specify Access Control Level keywords explicitly (explicit_acl)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:49:12: Warning: All declarations should specify Access Control Level keywords explicitly (explicit_acl)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:68:11: Warning: All declarations should specify Access Control Level keywords explicitly (explicit_acl)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:85:11: Warning: All declarations should specify Access Control Level keywords explicitly (explicit_acl)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:105:11: Warning: All declarations should specify Access Control Level keywords explicitly (explicit_acl)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:157:11: Warning: All declarations should specify Access Control Level keywords explicitly (explicit_acl)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:168:11: Warning: All declarations should specify Access Control Level keywords explicitly (explicit_acl)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:19:1: Warning: Top-level declarations should specify Access Control Level keywords explicitly (explicit_top_level_acl)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:20:1: Warning: Top-level declarations should specify Access Control Level keywords explicitly (explicit_top_level_acl)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:22:1: Warning: Top-level declarations should specify Access Control Level keywords explicitly (explicit_top_level_acl)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:19:5: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:20:5: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:58:17: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:74:13: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:77:17: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:91:13: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:94:17: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:111:13: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:115:17: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:116:17: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:117:17: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:118:17: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:145:17: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:147:17: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:162:13: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:163:13: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:201:13: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:202:13: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:208:13: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:217:13: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:218:13: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:226:13: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:236:13: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:238:13: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:1:1: Warning: Header comments should be consistent with project patterns (file_header)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:1:: Warning: File name should match a type or extension declared in the file (if any) (file_name)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:50:9: Warning: Prefer implicit returns in closures, functions and getters (implicit_return)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:250:9: Warning: Prefer implicit returns in closures, functions and getters (implicit_return)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:164:1: Warning: Code should be indented using one tab or 4 spaces (indentation_width)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:119:37: Warning: Prefer Swift value types to bridged Objective-C reference types (legacy_objc_type)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:163:76: Warning: Multiline arguments should have their surrounding brackets in a new line (multiline_arguments_brackets)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:164:107: Warning: Multiline arguments should have their surrounding brackets in a new line (multiline_arguments_brackets)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:197:1: Error: Prefer not to use extension access modifiers (no_extension_access_modifier)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:224:1: Error: Prefer not to use extension access modifiers (no_extension_access_modifier)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:248:1: Error: Prefer not to use extension access modifiers (no_extension_access_modifier)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:201:70: Warning: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:201:82: Warning: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:202:69: Warning: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:202:78: Warning: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:202:113: Warning: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:202:121: Warning: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:217:67: Warning: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:218:67: Warning: Magic numbers should be replaced by named constants (no_magic_numbers)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:46:6: Warning: Only a single declaration is allowed in a file (one_declaration_per_file)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:55:9: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:59:13: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:46:6: Warning: Classes should have an explicit deinit method (required_deinit)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:23:5: Warning: Enum cases should be sorted (sorted_enum_cases)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:24:5: Warning: Enum cases should be sorted (sorted_enum_cases)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:25:5: Warning: Enum cases should be sorted (sorted_enum_cases)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:26:5: Warning: Enum cases should be sorted (sorted_enum_cases)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:226:55: Warning: Parentheses are not needed when declaring closure arguments (unneeded_parentheses_in_closure_argument)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:238:41: Warning: Parentheses are not needed when declaring closure arguments (unneeded_parentheses_in_closure_argument)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:63:11: Warning: Catch statements should not declare error variables without type casting (untyped_error_in_catch)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:150:15: Warning: Catch statements should not declare error variables without type casting (untyped_error_in_catch)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:33:9: Warning: Include a single empty line between switch cases (vertical_whitespace_between_cases)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:35:9: Warning: Include a single empty line between switch cases (vertical_whitespace_between_cases)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:37:9: Warning: Include a single empty line between switch cases (vertical_whitespace_between_cases)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:39:9: Warning: Include a single empty line between switch cases (vertical_whitespace_between_cases)
📖 This PR fixed a violation in DuckDuckGo: /iOS/fastlane/SnapshotHelper.swift:54:1: Warning: Don't include vertical whitespace (empty line) after opening braces (vertical_whitespace_opening_braces)
📖 This PR fixed a violation in DuckDuckGo: /SharedPackages/Common/Package.swift:23:1: Warning: All declarations should specify Access Control Level keywords explicitly (explicit_acl)
📖 This PR fixed a violation in DuckDuckGo: /SharedPackages/Common/Package.swift:23:1: Warning: Top-level declarations should specify Access Control Level keywords explicitly (explicit_top_level_acl)
📖 This PR fixed a violation in DuckDuckGo: /SharedPackages/Common/Package.swift:23:5: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /SharedPackages/Common/Package.swift:23:5: Warning: Top-level constants should be prefixed by k (prefixed_toplevel_constant)
📖 This PR fixed a violation in DuckDuckGo: /SharedPackages/DDGError/Package.swift:23:1: Warning: All declarations should specify Access Control Level keywords explicitly (explicit_acl)
📖 This PR fixed a violation in DuckDuckGo: /SharedPackages/DDGError/Package.swift:23:1: Warning: Top-level declarations should specify Access Control Level keywords explicitly (explicit_top_level_acl)
📖 This PR fixed a violation in DuckDuckGo: /SharedPackages/DDGError/Package.swift:23:5: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /SharedPackages/DDGError/Package.swift:23:5: Warning: Top-level constants should be prefixed by k (prefixed_toplevel_constant)
📖 This PR fixed a violation in DuckDuckGo: /SharedPackages/Persistence/Package.swift:23:1: Warning: All declarations should specify Access Control Level keywords explicitly (explicit_acl)
📖 This PR fixed a violation in DuckDuckGo: /SharedPackages/Persistence/Package.swift:23:1: Warning: Top-level declarations should specify Access Control Level keywords explicitly (explicit_top_level_acl)
📖 This PR fixed a violation in DuckDuckGo: /SharedPackages/Persistence/Package.swift:23:5: Warning: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in DuckDuckGo: /SharedPackages/Persistence/Package.swift:23:5: Warning: Top-level constants should be prefixed by k (prefixed_toplevel_constant)
⚠️ Danger found 10594 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 163.

Generated by 🚫 Danger

@tomotakatakahashi
tomotakatakahashi marked this pull request as ready for review July 15, 2026 14:56

@SimplyDanny SimplyDanny left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is causing changes in scanned OSS repositories. That's definitely unexpected and should be revisited.

@tomotakatakahashi

Copy link
Copy Markdown
Author

Thank you for your feedback. I wasn't entirely clear on the comment from SwiftLintBot, but I now understand that I need to address the warnings. I will try to look into this, though my time might be a bit limited.

@tomotakatakahashi

Copy link
Copy Markdown
Author

@SimplyDanny After a little investigation, I now think the changes in the scanned OSS repositories are expected.

The files listed under "This PR fixed a violation":

  1. /SharedPackages/BrowserServicesKit/scripts/assets/Swift File For Package.xctemplate/___FILEBASENAME___.swift
  2. /SharedPackages/BrowserServicesKit/Package.swift
  3. /SharedPackages/BrowserServicesKit/Sources/RemoteMessaging/Model/AnyDecodable.swift
  4. /macOS/DuckDuckGo/Common/Localizables/UserText.swift

are all excluded via .swiftlint.yml files (1, 2, 3, 4) in that repository. So if the main branch were working correctly, these files shouldn't produce any violations at all. Therefore "This PR fixed a violation" messages are desirable and expected.

My guess is that the double-resolution bug was introduced by PR #6636, but somehow SwiftLintBot couldn't catch it.

Could you take a look?

@SimplyDanny

Copy link
Copy Markdown
Collaborator

I had another look at it, @tomotakatakahashi, and I think you are right and the fix is decent. Thank you and sorry for my doubts! I got so much used to be extra careful these days with so many automated low-quality contributions that I didn't believe in this rather simple fix and the OSS findings appeared to me like a warning signal.

As for testing, there is ConfigPathResolutionTests that tries to mimic the resolution logic for parent/child configs. It would be a good place to set up another scenario like we found in the said OSS repositories. For the command-line case, there's not really something similar.

Would you be willing to rebase as well? The builds seem to be stuck for whatever reason. A rebase should fix that.

@SimplyDanny SimplyDanny linked an issue Aug 27, 2026 that may be closed by this pull request
2 tasks done
@tomotakatakahashi

Copy link
Copy Markdown
Author

Thank you for your review. Your doubts are completely understandable, especially in the AI era. I appreciate you maintaining SwiftLint.

I've rebased the branch onto the latest main and force-pushed it.

I'll take a look at ConfigPathResolutionTests this weekend, hopefully.

@tomotakatakahashi

Copy link
Copy Markdown
Author

Sorry for the delay.

While I was adding test cases, Claude Code reported a potential regression. I'm investigating it.

I'll keep working on this, but I may not be very responsive, so feel free to take over this PR if you'd rather not wait.

@tomotakatakahashi
tomotakatakahashi marked this pull request as draft September 7, 2026 00:47
@tomotakatakahashi
tomotakatakahashi force-pushed the exclusion-ignored-6795 branch 2 times, most recently from aea09b4 to 76086fb Compare September 26, 2026 01:33
@tomotakatakahashi
tomotakatakahashi marked this pull request as ready for review September 26, 2026 01:47
@tomotakatakahashi

Copy link
Copy Markdown
Author

@SimplyDanny This PR is now ready for review. Could you take another look?

Notes:

  • I also opened a PR to resolve the regression reported by Claude Code. Ideally, that PR would be merged first to avoid the regression, but it's not strictly critical. I think the regression happens only when there is a .swiftlint.yml in one of ancestor directories of the working directory, which shouldn't be a common use case.
  • I added two test cases to ConfigPathResolutionTests.
    • nestedConfigurationBasicWithCommandLine is the test case for this change (i.e. fails on HEAD~ and passes on HEAD).
    • wildCardPatternCountWithCommandLine is actually not related to this change (fails on HEAD~ and HEAD), but I added it just to record the known limitation.
  • CHANGELOG.md is slightly updated. I changed "file paths" to "file paths matching a non-wildcard exclusion pattern".
  • The buildkite/swiftlint CI workflow is failing, but the failure looks unrelated to this PR's change.

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.

Two tests are added. `nestedConfigurationBasicWithCommandLine` is the
test for this change. `wildCardPatternCountWithCommandLine` is not
related to this change, but just added to note a remaining bug.
@tomotakatakahashi

Copy link
Copy Markdown
Author

I rebased this branch onto main to pick up #6932, which fixes the unrelated documentation job failure.

This branch has not been deployed

No deployments
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 this pull request may close these issues.

excluded seems to be ignore in 0.65.0

3 participants