We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
direct_return
When using swiftlint --fix with the direct_returnrule enabled, the following code lines are mishandled:
swiftlint --fix
let view = nib.instantiate(withOwner: self, options: nil).first as! UIView // swiftlint:disable:this force_cast return view
The rule currently updates the code to
// swiftlint:disable:this force_cast return nib.instantiate(withOwner: self, options: nil).first as! UIView // swiftlint:disable:this force_cast
adding the comment both before and after the statement. An expected update would be
return nib.instantiate(withOwner: self, options: nil).first as! UIView // swiftlint:disable:this force_cast
swiftlint version
only_rules: - direct_return
xcodebuild -version
The text was updated successfully, but these errors were encountered:
I have a possible fix for this ...
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
New Issue Checklist
Describe the bug
When using
swiftlint --fix
with thedirect_return
rule enabled, the following code lines are mishandled:The rule currently updates the code to
adding the comment both before and after the statement.
An expected update would be
Environment
swiftlint version
to be sure)? 0.52.3xcodebuild -version
)? Version 14.3.1 (14E300c)The text was updated successfully, but these errors were encountered: