Skip to content
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

chore: Enable ireturn linter #1082

Merged

Conversation

Tomasz-Smelcerz-SAP
Copy link
Member

@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP commented Nov 24, 2023

Description

Enable ireturn linter.
Note: I couldn't supress the ireturn linter warnings using nolint:ireturn directive, because then nolintlint linter complained that the directive is unused (it's a well known bug). To overcome this problem, I just added every returned interface to the central ireturn linter allow-list in the .golangci.yaml file.

Changes proposed in this pull request:

  • enable ireturn linter
  • work around problems with nolintlint linter

Related issue(s)
#1012

@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP requested a review from a team as a code owner November 24, 2023 00:57
@kyma-bot kyma-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 24, 2023
@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP changed the title Chore: enable ireturn linter chore: Enable ireturn linter Nov 24, 2023
@Tomasz-Smelcerz-SAP
Copy link
Member Author

Tomasz-Smelcerz-SAP commented Nov 24, 2023

The nolintlint linter has a well known issue with producing invalid warnings about unused linter:
golangci/golangci-lint#3228

@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP linked an issue Nov 27, 2023 that may be closed by this pull request
2 tasks
@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP force-pushed the chore/enable_ireturn_linter branch from 3abcaa7 to b56097b Compare November 27, 2023 09:09
@kyma-bot kyma-bot added the lgtm Looks good to me! label Nov 27, 2023
@kyma-bot kyma-bot merged commit 5098859 into kyma-project:main Nov 27, 2023
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Looks good to me! size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable the ireturn linter for Lifecycle Manager
3 participants