Skip to content

fix: fall back for invalid nested configurations - #6853

Open
raisulchowdhury wants to merge 5 commits into
realm:mainfrom
raisulchowdhury:codex-6052-nested-config-fallback
Open

fix: fall back for invalid nested configurations#6853
raisulchowdhury wants to merge 5 commits into
realm:mainfrom
raisulchowdhury:codex-6052-nested-config-fallback

Conversation

@raisulchowdhury

Copy link
Copy Markdown

Summary

  • Use SwiftLint's existing default-configuration fallback when an automatically discovered nested configuration cannot be parsed.
  • Preserve the existing failure behavior for explicitly supplied configuration files.
  • Add a duplicate-YAML regression fixture, focused tests, and the required changelog entry.

Fixes #6052

A prior implementation of this same narrow behavior was closed without merging in #6647; this version is adapted to the current test layout and verified against current main.

Validation

  • Focused regression test passed
  • MultipleConfigurationsTests: 30 passing
  • git diff --check

Assisted-by: OpenAI Codex. AI assistance was used for investigation, implementation, and test drafting; the submitted diff was reviewed and validated before publication.

Use the existing default-configuration fallback for automatically discovered nested SwiftLint configurations while preserving explicit configuration failures. Add a duplicate-key YAML regression test.\n\nAssisted-by: OpenAI Codex

Signed-off-by: raisulchowdhury <34920788+raisulchowdhury@users.noreply.github.com>
Assisted-by: OpenAI Codex
Signed-off-by: raisulchowdhury <34920788+raisulchowdhury@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 1, 2026 15:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@raisulchowdhury

Copy link
Copy Markdown
Author

Status note: the focused regression and full MultipleConfigurationsTests suite pass locally. The external Buildkite swiftlint and bazel contexts are currently failing, but their provider does not expose logs through GitHub; the local environment also does not have the bazel executable (make bazel_test cannot start). No code change was made based on an unverified external failure.

Assisted-by: OpenAI Codex.

@SwiftLintBot

SwiftLintBot commented Aug 1, 2026

Copy link
Copy Markdown
19 Messages
📖 Building this branch resulted in the same binary size as when built on main.
📖 Linting Aerial with this PR took 0.65 s vs 0.67 s on main (2% faster).
📖 Linting Alamofire with this PR took 0.95 s vs 0.94 s on main (1% slower).
📖 Linting Brave with this PR took 6.01 s vs 5.98 s on main (0% slower).
📖 Linting DuckDuckGo with this PR took 27.53 s vs 27.51 s on main (0% slower).
📖 Linting Firefox with this PR took 10.7 s vs 10.73 s on main (0% faster).
📖 Linting Kickstarter with this PR took 7.2 s vs 7.26 s on main (0% faster).
📖 Linting Moya with this PR took 0.39 s vs 0.36 s on main (8% slower).
📖 Linting NetNewsWire with this PR took 2.39 s vs 2.44 s on main (2% faster).
📖 Linting Nimble with this PR took 0.56 s vs 0.55 s on main (1% slower).
📖 Linting PocketCasts with this PR took 6.96 s vs 6.94 s on main (0% slower).
📖 Linting Quick with this PR took 0.38 s vs 0.37 s on main (2% slower).
📖 Linting Realm with this PR took 2.81 s vs 2.84 s on main (1% faster).
📖 Linting Sourcery with this PR took 1.62 s vs 1.57 s on main (3% slower).
📖 Linting Swift with this PR took 4.27 s vs 4.24 s on main (0% slower).
📖 Linting SwiftLintPerformanceTests with this PR took 0.16 s vs 0.16 s on main (0% slower).
📖 Linting VLC with this PR took 1.26 s vs 1.24 s on main (1% slower).
📖 Linting Wire with this PR took 15.43 s vs 15.34 s on main (0% slower).
📖 Linting WordPress with this PR took 9.73 s vs 9.71 s on main (0% slower).

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.

swiftlint crashes due to duplicate keys in configuration

3 participants