-
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
Fix false positives in valid_ibinspectable rule when using Swift 5.2 #3155
Merged
jpsim
merged 2 commits into
master
from
fix-false-positives-in-valid_ibinspectable-rule-when-using-swift-5.2
Mar 27, 2020
Merged
Fix false positives in valid_ibinspectable rule when using Swift 5.2 #3155
jpsim
merged 2 commits into
master
from
fix-false-positives-in-valid_ibinspectable-rule-when-using-swift-5.2
Mar 27, 2020
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
when defining inspectable properties in class extensions with computed properties. The following was triggering: ```swift extension Foo { @IBInspectable var color: UIColor { set { self.bar.textColor = newValue } get { return self.bar.textColor } } } ``` Fix by checking to see if an instance property has `set` keywords in its body when running with Swift 5.2 or later.
Generated by 🚫 Danger |
jpsim
deleted the
fix-false-positives-in-valid_ibinspectable-rule-when-using-swift-5.2
branch
March 27, 2020 17:04
pull bot
pushed a commit
to scope-demo/SwiftLint
that referenced
this pull request
Mar 27, 2020
…ealm#3155) * Fix false positives in valid_ibinspectable rule when using Swift 5.2 when defining inspectable properties in class extensions with computed properties. The following was triggering: ```swift extension Foo { @IBInspectable var color: UIColor { set { self.bar.textColor = newValue } get { return self.bar.textColor } } } ``` Fix by checking to see if an instance property has `set` keywords in its body when running with Swift 5.2 or later. * fixup! Fix false positives in valid_ibinspectable rule when using Swift 5.2
same problem |
Did the fix work for you? |
optionalendeavors
added a commit
to optionalendeavors/SwiftLint
that referenced
this pull request
Jul 12, 2020
* master: (101 commits) JUnit reporter for GitLab artifact:report:junit (realm#3177) Add empty changelog section release 0.39.2 Update CI to run jobs with Xcode 11.0 to 11.4 (realm#3168) Fix false positives in valid_ibinspectable rule when using Swift 5.2 (realm#3155) Fix attributes rule false positive with Swift 5.2 (realm#3154) Fix CHANGELOG link Fix false positives in redundant_objc_attribute with Swift 5.2 (realm#3152) Fix false positives on implicit_getter with Swift 5.2+ (realm#3151) Simplify regex (realm#3145) fix links about configuration rules (realm#3142) Add unused_import config options to require imports for each module used (realm#3123) Add empty changelog section release 0.39.1 Temporarily remove all SwiftSyntax rules and support (realm#3107) Fix unused_import rule reported locations and corrections (realm#3106) release 0.39.0 Fix false positive in `empty_string` rule with multiline literals (realm#3101) Fix PrivateActionRule in Swift 5.2 (realm#3092) Fix false positive in implicit_getter with Swift 5.2 (realm#3099) ... # Conflicts: # Source/SwiftLintFramework/Extensions/SwiftLintFile+Regex.swift
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.
when defining inspectable properties in class extensions with computed properties.
The following was triggering:
Fix by checking to see if an instance property has
set
keywords in its body when running with Swift 5.2 or later.