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

new-linter: ireturn (checks for function return type) #2219

Merged
merged 12 commits into from Sep 16, 2021

Conversation

butuzov
Copy link
Member

@butuzov butuzov commented Sep 5, 2021

This PR introduces a new linter ireturn that checks for function's returned types and adds the possibility to reject or allow specific types of interfaces.

https://github.com/butuzov/ireturn

TL/DR
Accept Interfaces, Return Concrete Types

@butuzov butuzov added the linter: new Support new linter label Sep 5, 2021
Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

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

in the test/testdata/ files can you try to use at least one imported element (from stdlib)?

.golangci.example.yml Outdated Show resolved Hide resolved
.golangci.example.yml Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
pkg/lint/lintersdb/manager.go Outdated Show resolved Hide resolved
test/testdata/ireturn_allow.go Outdated Show resolved Hide resolved
@butuzov butuzov requested a review from ldez September 6, 2021 02:39
@butuzov
Copy link
Member Author

butuzov commented Sep 6, 2021

All issues from the previous CR are fixed, I will be glad if you can take a second look to spot any issues that left?

pkg/config/linters_settings.go Outdated Show resolved Hide resolved
Co-authored-by: Ludovic Fernandez <ldez@users.noreply.github.com>
@butuzov butuzov requested a review from ldez September 6, 2021 12:56
@butuzov
Copy link
Member Author

butuzov commented Sep 8, 2021

Thank you for the corrections and approval.

@ldez ldez merged commit 2ea496f into golangci:master Sep 16, 2021
@butuzov butuzov deleted the newLinterIReturn branch September 16, 2021 12:28
SeigeC pushed a commit to SeigeC/golangci-lint that referenced this pull request Apr 4, 2023
@ldez ldez added this to the v1.43 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linter: new Support new linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants