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

generated app directory fails linting with golangci-lint #331

Open
sneak opened this issue Nov 27, 2022 · 1 comment
Open

generated app directory fails linting with golangci-lint #331

sneak opened this issue Nov 27, 2022 · 1 comment
Labels
help wanted We'd love your help!

Comments

@sneak
Copy link

sneak commented Nov 27, 2022

golangci-lint run --fix
bud/internal/app/main.go:74:19: Error return value of `budClient.Publish` is not checked (errcheck)
	budClient.Publish("app:ready", nil)

As part of CI I run a linting of my repository. I suggest adding the line //nolint at the top of the template for bud/internal/app/main.go, as well as any other bud-managed template boilerplate files. This way any linters people use will ignore these files (without having to do special configuration to exclude the bud directory like is already automagically done in the .gitignore.)

@matthewmueller matthewmueller added the help wanted We'd love your help! label Nov 28, 2022
@matthewmueller
Copy link
Contributor

Oh that's neat! I actually think we should lint these files? If that's the only issue reported, that's an easy fix.

Longer-term we'd want lints to be run on the generated test code, so it'd block a release. For now, I'd suggest fixing that one case, then keeping an eye on it. If it becomes more unwieldy, I'm also open to //nolint comments, but I do want the generated code to be as good as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted We'd love your help!
Projects
None yet
Development

No branches or pull requests

2 participants