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

Skip if func calls another function returning interface #34

Open
nawa opened this issue Dec 3, 2021 · 0 comments
Open

Skip if func calls another function returning interface #34

nawa opened this issue Dec 3, 2021 · 0 comments

Comments

@nawa
Copy link

nawa commented Dec 3, 2021

The linter should't complain about the next case

import "outerpackage"

func DoSmth() IFace {
    return outerpackage.F()
}

func DoSmth2() IFace {
    res := outerpackage.F()
    return res
}

Often this outerpackage isn't controlled and goes from an external dependency so there is no way to change it

Resume: if the result of function is instantiated in ANOTHER package the linter should skip this case

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

No branches or pull requests

1 participant