-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new opaque_over_existential
rule
#5915
Merged
Merged
Conversation
This file contains 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
45f3c2d
to
14140b4
Compare
This rule leads to false positives when a protocol requires an protocol P {}
protocol R {
func f(p: any P)
}
struct S: R {
func f(p: some P) {} // compile error
} See https://forums.swift.org/t/existential-parameter-type-cannot-be-implemented-with-opaque-type/76895/1. |
5a4877a
to
99df828
Compare
99df828
to
57c76da
Compare
a5f4e9c
to
2ca0567
Compare
2ca0567
to
41d1c8a
Compare
41d1c8a
to
96b7486
Compare
kelan
added a commit
to Whatnot-Inc/SwiftLint
that referenced
this pull request
Feb 14, 2025
* origin/main: (260 commits) Add new `opaque_over_existential` rule (realm#5915) Exclude `@Suite` types and `@Test` functions from `no_magic_numbers` analysis (realm#5968) Move `--only-rule` option to common arguments (realm#5981) Restrict permissions of remaining workflows (realm#5997) Restrict workflow permissions (realm#5996) Delete branch after merge Ensure that content is complete using an awaitable stream (realm#5986) Enable upcoming features improving concurrency checking (realm#5994) Fix some typos (realm#5993) Update contribution manual (realm#5992) Fix linting issues in README (realm#5991) Update Docker image used in testing Add job to lint workflow files (realm#5989) Automatically merge release branch upon publishing a release Parallelize file grouping (realm#5983) Verify that severity can be configured per rule (realm#5985) Consider composed inherited types (realm#5984) Avoid reading files before checking the cache (realm#5973) Parallelize SwiftLintFile construction for a modest speedup (realm#5967) Move more build steps into Makefile (realm#5975) ...
kelan
added a commit
to Whatnot-Inc/SwiftLint
that referenced
this pull request
Feb 14, 2025
* origin/main: (424 commits) Add new `opaque_over_existential` rule (realm#5915) Exclude `@Suite` types and `@Test` functions from `no_magic_numbers` analysis (realm#5968) Move `--only-rule` option to common arguments (realm#5981) Restrict permissions of remaining workflows (realm#5997) Restrict workflow permissions (realm#5996) Delete branch after merge Ensure that content is complete using an awaitable stream (realm#5986) Enable upcoming features improving concurrency checking (realm#5994) Fix some typos (realm#5993) Update contribution manual (realm#5992) Fix linting issues in README (realm#5991) Update Docker image used in testing Add job to lint workflow files (realm#5989) Automatically merge release branch upon publishing a release Parallelize file grouping (realm#5983) Verify that severity can be configured per rule (realm#5985) Consider composed inherited types (realm#5984) Avoid reading files before checking the cache (realm#5973) Parallelize SwiftLintFile construction for a modest speedup (realm#5967) Move more build steps into Makefile (realm#5975) ...
AhmedZaghloul19
pushed a commit
to AhmedZaghloul19/SwiftLint
that referenced
this pull request
Feb 19, 2025
AhmedZaghloul19
pushed a commit
to AhmedZaghloul19/SwiftLint
that referenced
this pull request
Feb 19, 2025
kelan
added a commit
to Whatnot-Inc/SwiftLint
that referenced
this pull request
Feb 25, 2025
* upstream/main: (433 commits) Cleanup and format Bazel files (realm#6007) Remove workaround silencing SourceKitten build warning (realm#6006) Update dependencies (realm#6004) Make Danger run first Fix author extraction Silence `no_magic_numbers` rule in `#if` conditions (realm#6001) Add checkout step Use shorter name Add action that marks/closes stale issues Add new `opaque_over_existential` rule (realm#5915) Exclude `@Suite` types and `@Test` functions from `no_magic_numbers` analysis (realm#5968) Move `--only-rule` option to common arguments (realm#5981) Restrict permissions of remaining workflows (realm#5997) Restrict workflow permissions (realm#5996) Delete branch after merge Ensure that content is complete using an awaitable stream (realm#5986) Enable upcoming features improving concurrency checking (realm#5994) Fix some typos (realm#5993) Update contribution manual (realm#5992) Fix linting issues in README (realm#5991) ...
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.
Inspired by https://www.douggregor.net/posts/swift-for-cxx-practitioners-type-erasure.