Skip to content

Conversation

Afterous
Copy link
Contributor

@Afterous Afterous commented Oct 9, 2024

This will correct a false positive reported in #1421

Let me know if there are any other alterations needed.

Thank you!

Fixes #1421

This will cause the check to stop looking if we are going into an Else
block when we have found a deferStmt.
@Afterous
Copy link
Contributor Author

Afterous commented Nov 9, 2024

Thank you @alexandear , let me know if there is anything else I can do with this PR before you merge it.

@alexandear
Copy link
Contributor

@Afterous Unfortunately, I can't merge because I'm not a maintainer.

@alexandear
Copy link
Contributor

Please edit PR's description with Fixes #1421, so the GitHub will automatically close the issue after merging.

@Afterous Afterous changed the title checkers/exitAfterDefer: Fix for issue 1421 checkers/exitAfterDefer: Fixes #1421 Nov 21, 2024
@Afterous
Copy link
Contributor Author

I added the string Fixes #1421 to both the first comment and the PR title.

Copy link
Member

@cristaloleg cristaloleg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cristaloleg cristaloleg changed the title checkers/exitAfterDefer: Fixes #1421 checkers/exitAfterDefer: handle optional defer properly Mar 19, 2025
@cristaloleg
Copy link
Member

Thanks!

@cristaloleg cristaloleg merged commit c9f7e08 into go-critic:master Mar 19, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

exitAfterDefer: false positive
3 participants