Implement allowed_types option for one-declaration-per-file rule#6082
Open
snofla wants to merge 81 commits intorealm:mainfrom
Open
Implement allowed_types option for one-declaration-per-file rule#6082snofla wants to merge 81 commits intorealm:mainfrom
allowed_types option for one-declaration-per-file rule#6082snofla wants to merge 81 commits intorealm:mainfrom
Conversation
Generated by 🚫 Danger |
one-declaration-per-file ruleallowed_types option for one-declaration-per-file rule
Xcode 15.4 has been removed from macOS 15 runners.
Co-authored-by: Danny Mösch <[email protected]>
Bumps the github-actions group with 1 update: [DavidAnson/markdownlint-cli2-action](https://github.com/davidanson/markdownlint-cli2-action). Updates `DavidAnson/markdownlint-cli2-action` from 19 to 20 - [Release notes](https://github.com/davidanson/markdownlint-cli2-action/releases) - [Commits](DavidAnson/markdownlint-cli2-action@v19...v20) --- updated-dependencies: - dependency-name: DavidAnson/markdownlint-cli2-action dependency-version: '20' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Convert FileLengthRule to use SwiftSyntax instead of SourceKit for improved performance and fewer false positives. The SwiftSyntax implementation: - Uses ViolationsSyntaxVisitor pattern with token traversal - Correctly handles multiline tokens by counting all spanned lines - Properly excludes comment-only and whitespace-only lines - Accurately attributes trivia to correct line positions - Extracts common line range logic to reduce code duplication
…on (realm#6102) Split the monolithic GeneratedTests target (242 test classes) into 10 sharded targets with ~25 tests each to enable parallel test execution. Reduces test time from 85.4s to 36.7s (57% improvement) by running shards concurrently. Most shards finish in 2-8s with 2 outliers at 30-37s. The implementation automatically scales with new rules and provides parallel test execution with improved code maintainability.
Which should help get better remote cache hits.
Which should be much faster than the previous SwiftPM build in the common case of not having to rebuild SwiftSyntax.
Collaborator
|
I wonder what the meaning of this option should be. Does it mean "these types do not count at all" or is it like "files with only these types are ignored"? In other words, with class C {}
struct S {}trigger or not? |
Author
|
@SimplyDanny It would not trigger. A better name for the option would be: but a another, perhaps more correct but less verbose name escapes me right now :) |
Collaborator
|
|
Co-authored-by: Danny Mösch <[email protected]>
The variable is only used in `setUp` and `tearDown` and so access is not concurrent.
This reverts commit deb3678.
…n` rule (realm#6172) Co-authored-by: Danny Mösch <[email protected]>
… into one-decl-per-file * 'one-decl-per-file' of https://github.com/snofla/SwiftLint: Fix default rules Minor fixes Add unit test, add changelog entry Initial implementation of allowed_types option for `one-declaration-per-file` rule # Conflicts: # Source/SwiftLintBuiltInRules/Rules/Idiomatic/OneDeclarationPerFileRule.swift # Source/SwiftLintBuiltInRules/Rules/RuleConfigurations/OneDeclarationPerFileConfiguration.swift # Tests/BuiltInRulesTests/OneDeclarationPerFileConfigurationTest.swift
Collaborator
|
Before you continue, please rebase your PR onto the most recent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP: This is going to resolve #6072