Skip to content

Honor allow_zero_lintable_files set in a parent configuration - #6761

Closed
systemblueio wants to merge 1 commit into
realm:mainfrom
systemblueio:fix/6240-allow-zero-lintable-files-parent-config
Closed

systemblueio wants to merge 1 commit into
realm:mainfrom
systemblueio:fix/6240-allow-zero-lintable-files-parent-config

Conversation

@systemblueio

Copy link
Copy Markdown
Contributor

Fixes #6240.

Merging always took the child config's allowZeroLintableFiles, which defaults to false, so allow_zero_lintable_files: true in a parent_config was reset whenever the child omitted the key. This ORs the parent and child values and adds a merge regression test.

Verified with swift test --filter MultipleConfigurationsTests (30 tests pass).

Merging always took the child's allowZeroLintableFiles value, which
defaults to false, so a parent config that set it to true was reset
whenever a child config omitted the key. OR the parent and child
values instead, and add a merge regression test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@SwiftLintBot

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.69 s vs 0.67 s on main (2% slower).
📖 Linting Alamofire with this PR took 0.94 s vs 0.95 s on main (1% faster).
📖 Linting Brave with this PR took 6.07 s vs 6.05 s on main (0% slower).
📖 Linting DuckDuckGo with this PR took 25.0 s vs 24.91 s on main (0% slower).
📖 Linting Firefox with this PR took 10.38 s vs 10.4 s on main (0% faster).
📖 Linting Kickstarter with this PR took 7.39 s vs 7.58 s on main (2% faster).
📖 Linting Moya with this PR took 0.37 s vs 0.41 s on main (9% faster).
📖 Linting NetNewsWire with this PR took 2.32 s vs 2.35 s on main (1% faster).
📖 Linting Nimble with this PR took 0.56 s vs 0.57 s on main (1% faster).
📖 Linting PocketCasts with this PR took 7.23 s vs 7.19 s on main (0% slower).
📖 Linting Quick with this PR took 0.35 s vs 0.37 s on main (5% faster).
📖 Linting Realm with this PR took 2.51 s vs 2.56 s on main (1% faster).
📖 Linting Sourcery with this PR took 1.5 s vs 1.54 s on main (2% faster).
📖 Linting Swift with this PR took 4.25 s vs 4.25 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.02 s vs 1.04 s on main (1% faster).
📖 Linting Wire with this PR took 15.13 s vs 15.17 s on main (0% faster).
📖 Linting WordPress with this PR took 10.49 s vs 10.47 s on main (0% slower).

Generated by 🚫 Danger

cachePath: cachePath,
allowZeroLintableFiles: childConfiguration.allowZeroLintableFiles,
allowZeroLintableFiles: allowZeroLintableFiles || childConfiguration.allowZeroLintableFiles,
strict: childConfiguration.strict,

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.

The same can be discussed about the other properties, too. reporter and cachePath don't even see, to support overwriting. So I'm not very happy to just change the behavior for allowZeroLintableFiles if we don't have a good general concept.

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_zero_lintable_files: true doesn't work when added to a parent config that's loaded by a child config

3 participants