-
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
Dont trigger for non-optional type casting, or for optional types #5805
Merged
mildm8nnered
merged 4 commits into
realm:main
from
mildm8nnered:mildm8nnered-prefer-type-checking-fix
Oct 11, 2024
Merged
Dont trigger for non-optional type casting, or for optional types #5805
mildm8nnered
merged 4 commits into
realm:main
from
mildm8nnered:mildm8nnered-prefer-type-checking-fix
Oct 11, 2024
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
Generated by 🚫 Danger |
mildm8nnered
force-pushed
the
mildm8nnered-prefer-type-checking-fix
branch
from
September 21, 2024 18:47
2020e54
to
4999b47
Compare
mildm8nnered
force-pushed
the
mildm8nnered-prefer-type-checking-fix
branch
from
September 29, 2024 22:16
4999b47
to
efa6b93
Compare
Naveen-C-Ramachandrappa
approved these changes
Oct 3, 2024
mildm8nnered
force-pushed
the
mildm8nnered-prefer-type-checking-fix
branch
from
October 5, 2024 17:23
efa6b93
to
1b33458
Compare
2 tasks
SimplyDanny
requested changes
Oct 7, 2024
Source/SwiftLintBuiltInRules/Rules/Idiomatic/PreferTypeCheckingRule.swift
Show resolved
Hide resolved
Source/SwiftLintBuiltInRules/Rules/Idiomatic/PreferTypeCheckingRule.swift
Show resolved
Hide resolved
Source/SwiftLintBuiltInRules/Rules/Idiomatic/PreferTypeCheckingRule.swift
Outdated
Show resolved
Hide resolved
Source/SwiftLintBuiltInRules/Rules/Idiomatic/PreferTypeCheckingRule.swift
Show resolved
Hide resolved
mildm8nnered
force-pushed
the
mildm8nnered-prefer-type-checking-fix
branch
from
October 8, 2024 18:03
63e1ee5
to
bddd8c2
Compare
SimplyDanny
approved these changes
Oct 11, 2024
Source/SwiftLintBuiltInRules/Rules/Idiomatic/PreferTypeCheckingRule.swift
Show resolved
Hide resolved
2 tasks
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.
Addresses #5802
We no longer trigger unless the type casting is optional (
as?
), or if the type is optional.Essentially, in either case, the correction would change the resulting
true
orfalse
value. See #5802 for details.We also now check for
nil != foo as? Bar
cases