Skip to content

Commit

Permalink
all: unlint what is now cropping up
Browse files Browse the repository at this point in the history
gosec ones are delibate; govet ones are now randomly showing up (and
also deliberate)
  • Loading branch information
twmb committed Oct 10, 2024
1 parent 6a75940 commit 0de933b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ linters:
- asciicheck
- bidichk
- bodyclose
- copyloopvar
- durationcheck
- exhaustive
- exportloopref
- gocritic
- gofmt
- gofumpt
Expand Down Expand Up @@ -74,6 +74,7 @@ linters-settings:
excludes:
- G104 # unhandled errors, we exclude for the same reason we do not use errcheck
- G404 # we want math/rand
- G115 # irrelevant flags in this repo

# Gocritic is a meta linter that has very good lints, and most of the
# experimental ones are very good too. We opt into everything, which helps
Expand Down
6 changes: 3 additions & 3 deletions generate/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ func (s Struct) WriteDefault(l *LineWriter) {

func (s Struct) WriteDefn(l *LineWriter) {
if s.Comment != "" {
l.Write(s.Comment)
l.Write(s.Comment) //nolint:govet // ...
}
l.Write("type %s struct {", s.Name)
if s.TopLevel {
Expand Down Expand Up @@ -822,15 +822,15 @@ func (s Struct) WriteNewPtrFunc(l *LineWriter) {

func (e Enum) WriteDefn(l *LineWriter) {
if e.Comment != "" {
l.Write(e.Comment)
l.Write(e.Comment) //nolint:govet // ...
l.Write("// ")
}
l.Write("// Possible values and their meanings:")
l.Write("// ")
for _, v := range e.Values {
l.Write("// * %d (%s)", v.Value, v.Word)
if len(v.Comment) > 0 {
l.Write(v.Comment)
l.Write(v.Comment) //nolint:govet // ...
}
l.Write("//")
}
Expand Down

0 comments on commit 0de933b

Please sign in to comment.