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

fix: init functions and AllowPair fields #74

Merged
merged 5 commits into from
May 2, 2024
Merged

Conversation

ldez
Copy link
Contributor

@ldez ldez commented May 2, 2024

golangci-lint uses go-errorlint as a lib, then init functions can be a problem because they are always called.

The PR removes the need to use init functions:

The new signature of NewAnalyzer allows to set use options but the fields of AllowPair are not exposed, so it's impossible to use WithAllowedErrors or WithAllowedWildcard.
The PR exposes the fields err and fun of the structure AllowPair.

Related to #69

@ldez ldez changed the title fix: init function and AllowPair fields fix: init functions and AllowPair fields May 2, 2024
@polyfloyd polyfloyd merged commit eaedd2b into polyfloyd:main May 2, 2024
2 checks passed
@polyfloyd
Copy link
Owner

Nice, thanks!

@ldez ldez deleted the fix/init branch May 2, 2024 16:21
@ldez
Copy link
Contributor Author

ldez commented May 2, 2024

@polyfloyd could you create a new tag?

@polyfloyd
Copy link
Owner

Yes! Of course. CI should be running now

@ldez
Copy link
Contributor Author

ldez commented May 2, 2024

Thank you ❤️

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.

None yet

2 participants