-
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
Allow unused_setter_value for overrides #3653
Conversation
@grosem what do you think about checking that the |
Makes sense, I'll try to add that 👍 |
@marcelofabri I tried to find the easiest way to accomplish that, what do you think? |
Hi, thanks for this PR! I'm seeing a similar problem in my codebase and would like to see the PR merged. Can you try to revive this PR @grosem? Current problem I'm seeing in the checks on this PR – Instead of |
Sure thing, thank you for your comment. In my local version I had that already fixed but didn't commit it for a reason I cannot remember... if there is anything else to adjust, please let me know! |
Thanks for the fix! The PR now seem to pass, hope we can get someone to review and merge this. |
674f480
to
4274887
Compare
Thanks for the contribution! |
get { | ||
return Persister.shared.aValue | ||
} | ||
set() { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These examples get automatically run as tests, right?
This example fails for me, on v0.46.2
echo 'private var abc: Int { get { 123 } set() { } }' | swiftlint lint --no-cache --use-stdin --enable-all-rules
<nopath>:1:36: warning: Unused Setter Value Violation: Setter value is not used. (unused_setter_value)
Done linting! Found 1 violation, 0 serious in 1 file.
Can you reproduce?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes these are run as tests, please open a new issue with full steps to reproduce, what you're seeing and what you're expecting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened #3863 :)
Fixes #2585. Happy to make changes if necessary 😎