Skip to content

feat(cli): add --parent-config for lint and analyze#6651

Open
leno23 wants to merge 1 commit into
realm:mainfrom
leno23:feat/parent-config-cli-5421
Open

feat(cli): add --parent-config for lint and analyze#6651
leno23 wants to merge 1 commit into
realm:mainfrom
leno23:feat/parent-config-cli-5421

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 17, 2026

Summary

  • Add --parent-config to lint and analyze commands.
  • Parent configuration paths are prepended to the configuration hierarchy, equivalent to using parent_config in YAML without editing the child file.

Fixes #5421

Test plan

  • testParentConfigCommandLineOption compares CLI resolution with existing ParentConfig/Test2 YAML fixture
  • CI (Buildkite)

Usage

swiftlint lint --parent-config path/to/parent.yml
swiftlint lint --parent-config parent.yml --config .swiftlint.yml

Prepend parent configuration paths to the child config hierarchy so
parent settings can be supplied from the command line.

Fixes realm#5421
@SwiftLintBot
Copy link
Copy Markdown

19 Messages
📖 Building this branch resulted in a binary size of 27639.29 KiB vs 27639.02 KiB when built on main (0% larger).
📖 Linting Aerial with this PR took 0.81 s vs 0.84 s on main (3% faster).
📖 Linting Alamofire with this PR took 1.12 s vs 1.15 s on main (2% faster).
📖 Linting Brave with this PR took 7.43 s vs 7.44 s on main (0% faster).
📖 Linting DuckDuckGo with this PR took 29.88 s vs 29.92 s on main (0% faster).
📖 Linting Firefox with this PR took 12.68 s vs 12.7 s on main (0% faster).
📖 Linting Kickstarter with this PR took 8.66 s vs 8.63 s on main (0% slower).
📖 Linting Moya with this PR took 0.45 s vs 0.48 s on main (6% faster).
📖 Linting NetNewsWire with this PR took 2.92 s vs 2.92 s on main (0% slower).
📖 Linting Nimble with this PR took 0.72 s vs 0.7 s on main (2% slower).
📖 Linting PocketCasts with this PR took 8.16 s vs 8.28 s on main (1% faster).
📖 Linting Quick with this PR took 0.49 s vs 0.43 s on main (13% slower).
📖 Linting Realm with this PR took 3.09 s vs 3.01 s on main (2% slower).
📖 Linting Sourcery with this PR took 1.92 s vs 1.93 s on main (0% faster).
📖 Linting Swift with this PR took 4.85 s vs 4.87 s on main (0% faster).
📖 Linting SwiftLintPerformanceTests with this PR took 0.33 s vs 0.33 s on main (0% slower).
📖 Linting VLC with this PR took 1.27 s vs 1.24 s on main (2% slower).
📖 Linting Wire with this PR took 19.32 s vs 19.33 s on main (0% faster).
📖 Linting WordPress with this PR took 13.02 s vs 13.07 s on main (0% faster).

Generated by 🚫 Danger

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.

Allow parent config as an argument

2 participants