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

Allow to exclude the structure object if all fields are not filled in #38

Open
Raneddo opened this issue Dec 26, 2023 · 1 comment
Open

Comments

@Raneddo
Copy link

Raneddo commented Dec 26, 2023

Go often uses the return-from-function approach of the form: (Type, bool) instead of (*Type)

Now linter knows how to detect when an empty object is returned along with a non-empty error, but the same doesn't work for returning a bool second parameter return

I propose to add two exception parameters:

  1. exclude-type-bool to return an empty value from a function in the format (Type, bool)
  2. exclude-empty-value for any return of an empty value (all fields of the structure are not filled)
@breml
Copy link
Owner

breml commented Feb 29, 2024

Hi @Raneddo
Sorry for my slow response. I am not sure I can follow your proposal. Can you please give a code example with a description what you expect to see and what you see instead. Thanks.

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

2 participants