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

go-staticcheck linter warnings in generated code #80

Open
livepatcher opened this issue Mar 21, 2022 · 1 comment
Open

go-staticcheck linter warnings in generated code #80

livepatcher opened this issue Mar 21, 2022 · 1 comment

Comments

@livepatcher
Copy link

I'm seeing these linter warnings on generated code (see screenshots):

error strings should not be capitalized (ST1005)
file mode '420' evaluates to 0644; did you mean '0420'? (SA9002)

Not a big deal, but I'd like to keep my workspace clean of warnings. go-staticcheck seems especially opinionated about how to do this, and wants to put this on the responsibility of library authors: dominikh/go-tools#429 (comment)

There are a few options I can see:

  1. update the codegen to avoid these warnings
  2. emit //lint:file-ignore (or a rule-specific ignore) to silence the warnings
  3. hack around it locally

What do you think? I'm happy to put up a PR once there is a decision

Screenshots:

image

image

@Bellisario
Copy link

Same problem for me...

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