mirror of
https://github.com/traefik/traefik.git
synced 2026-05-04 20:06:21 +02:00
Upgrade golangci-lint
This commit is contained in:
parent
7494b5c9ff
commit
288e4e2e2b
2
.github/workflows/validate.yaml
vendored
2
.github/workflows/validate.yaml
vendored
@ -7,7 +7,7 @@ on:
|
||||
|
||||
env:
|
||||
GO_VERSION: '1.25'
|
||||
GOLANGCI_LINT_VERSION: v2.8.0
|
||||
GOLANGCI_LINT_VERSION: v2.10.1
|
||||
MISSPELL_VERSION: v0.7.0
|
||||
|
||||
jobs:
|
||||
|
||||
@ -309,7 +309,7 @@ linters:
|
||||
text: 'var-naming: avoid meaningless package names'
|
||||
linters:
|
||||
- revive
|
||||
- path: (pkg/muxer/http/.+|pkg/provider/http/.+)\.go
|
||||
- path: ((cmd|pkg)/version/.*|pkg/config/runtime/.*|pkg/log/.*|pkg/(middlewares/)?metrics/.*|pkg/muxer/http/.+|pkg/provider/http/.+|pkg/tls/.+)\.go
|
||||
text: 'var-naming: avoid package names that conflict with Go standard library package names'
|
||||
linters:
|
||||
- revive
|
||||
|
||||
@ -158,7 +158,7 @@ func (c Centrifuge) run(sc *types.Scope, rootPkg string, pkgName string) map[str
|
||||
|
||||
func (c Centrifuge) writeStruct(name string, obj *types.Struct, rootPkg string, elt *File) string {
|
||||
b := strings.Builder{}
|
||||
b.WriteString(fmt.Sprintf("type %s struct {\n", name))
|
||||
fmt.Fprintf(&b, "type %s struct {\n", name)
|
||||
|
||||
for i := range obj.NumFields() {
|
||||
field := obj.Field(i)
|
||||
@ -175,7 +175,7 @@ func (c Centrifuge) writeStruct(name string, obj *types.Struct, rootPkg string,
|
||||
fType := c.TypeCleaner(field.Type(), rootPkg)
|
||||
|
||||
if field.Embedded() {
|
||||
b.WriteString(fmt.Sprintf("\t%s\n", fType))
|
||||
fmt.Fprintf(&b, "\t%s\n", fType)
|
||||
continue
|
||||
}
|
||||
|
||||
@ -184,10 +184,10 @@ func (c Centrifuge) writeStruct(name string, obj *types.Struct, rootPkg string,
|
||||
continue
|
||||
}
|
||||
|
||||
b.WriteString(fmt.Sprintf("\t%s %s", field.Name(), fType))
|
||||
fmt.Fprintf(&b, "\t%s %s", field.Name(), fType)
|
||||
|
||||
if ok {
|
||||
b.WriteString(fmt.Sprintf(" `json:\"%s\"`", strings.Join(values, ",")))
|
||||
fmt.Fprintf(&b, " `json:\"%s\"`", strings.Join(values, ","))
|
||||
}
|
||||
|
||||
b.WriteString("\n")
|
||||
|
||||
@ -300,7 +300,7 @@ THIS FILE MUST NOT BE EDITED BY HAND
|
||||
}
|
||||
|
||||
if w.err != nil {
|
||||
logger.Fatal(err)
|
||||
logger.Fatal(w.err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ package acme
|
||||
import "os"
|
||||
|
||||
// CheckFile checks file content size
|
||||
// Do not check file permissions on Windows right now
|
||||
// Do not check file permissions on Windows right now.
|
||||
func CheckFile(name string) (bool, error) {
|
||||
f, err := os.Open(name)
|
||||
if err != nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user