Skip to content

Re-add @-prefixed response files#6815

Open
dflems wants to merge 2 commits into
realm:mainfrom
dflems:response-files
Open

Re-add @-prefixed response files#6815
dflems wants to merge 2 commits into
realm:mainfrom
dflems:response-files

Conversation

@dflems

@dflems dflems commented Jul 10, 2026

Copy link
Copy Markdown

Once upon a time, SwiftLint supported @-prefixed response/param files in the lint and analyze subcommands. Like xcfilelist files, these would be expanded in-place in the command. It seems this functionality was (perhaps accidentally) removed in #5811 (0.57.1) with the last (unused) vestiges of it removed in #6125.

This PR adds it back. It repurposes a bit of code from CompilerArgumentsExtractor and shares it across both use cases. Practically there's no major difference other than that @-prefixed arguments are expanded in-place.

@dflems

dflems commented Jul 10, 2026

Copy link
Copy Markdown
Author

@SimplyDanny - maybe you could comment on whether this was intentional in the original PR or more of an accidental casualty 😅

@SwiftLintBot

SwiftLintBot commented Jul 10, 2026

Copy link
Copy Markdown
19 Messages
📖 Building this branch resulted in a binary size of 28357.74 KiB vs 28357.8 KiB when built on main (-1% smaller).
📖 Linting Aerial with this PR took 0.68 s vs 0.67 s on main (1% slower).
📖 Linting Alamofire with this PR took 0.93 s vs 0.92 s on main (1% slower).
📖 Linting Brave with this PR took 5.98 s vs 6.02 s on main (0% faster).
📖 Linting DuckDuckGo with this PR took 25.96 s vs 26.01 s on main (0% faster).
📖 Linting Firefox with this PR took 10.57 s vs 10.54 s on main (0% slower).
📖 Linting Kickstarter with this PR took 7.34 s vs 7.34 s on main (0% slower).
📖 Linting Moya with this PR took 0.35 s vs 0.36 s on main (2% faster).
📖 Linting NetNewsWire with this PR took 2.36 s vs 2.35 s on main (0% slower).
📖 Linting Nimble with this PR took 0.59 s vs 0.58 s on main (1% slower).
📖 Linting PocketCasts with this PR took 6.98 s vs 6.98 s on main (0% slower).
📖 Linting Quick with this PR took 0.33 s vs 0.33 s on main (0% slower).
📖 Linting Realm with this PR took 2.46 s vs 2.46 s on main (0% slower).
📖 Linting Sourcery with this PR took 1.5 s vs 1.52 s on main (1% faster).
📖 Linting Swift with this PR took 4.29 s vs 4.3 s on main (0% faster).
📖 Linting SwiftLintPerformanceTests with this PR took 0.16 s vs 0.16 s on main (0% slower).
📖 Linting VLC with this PR took 1.11 s vs 1.13 s on main (1% faster).
📖 Linting Wire with this PR took 15.32 s vs 15.36 s on main (0% faster).
📖 Linting WordPress with this PR took 9.75 s vs 9.82 s on main (0% faster).

Generated by 🚫 Danger


func run() async throws {
// Analyze files in current working directory if no paths were specified.
let allPaths = paths.isNotEmpty ? paths : [URL.cwd]

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Moved this to the resolvedPaths helper so it's shared between the lint and analyze commands

} ?? [arg]
}
}
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Same implementation that was formerly in Source/SwiftLintFramework/CompilerArgumentsExtractor.swift

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.

2 participants