chore: update linter
This commit is contained in:
parent
9e96089da6
commit
371b6e3c86
12 changed files with 5 additions and 14 deletions
2
.github/workflows/validate.yaml
vendored
2
.github/workflows/validate.yaml
vendored
|
@ -7,7 +7,7 @@ on:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GO_VERSION: 1.17
|
GO_VERSION: 1.17
|
||||||
GOLANGCI_LINT_VERSION: v1.43.0
|
GOLANGCI_LINT_VERSION: v1.44.0
|
||||||
MISSSPELL_VERSION: v0.3.4
|
MISSSPELL_VERSION: v0.3.4
|
||||||
PRE_TARGET: ""
|
PRE_TARGET: ""
|
||||||
|
|
||||||
|
|
|
@ -102,6 +102,8 @@
|
||||||
"nilnil", # not relevant
|
"nilnil", # not relevant
|
||||||
"ireturn", # not relevant
|
"ireturn", # not relevant
|
||||||
"contextcheck", # too many false-positive
|
"contextcheck", # too many false-positive
|
||||||
|
"containedctx", # too many false-positive
|
||||||
|
"maintidx", # kind of duplicate of gocyclo
|
||||||
]
|
]
|
||||||
|
|
||||||
[issues]
|
[issues]
|
||||||
|
|
|
@ -25,7 +25,7 @@ global_job_config:
|
||||||
- export "PATH=${GOPATH}/bin:${PATH}"
|
- export "PATH=${GOPATH}/bin:${PATH}"
|
||||||
- mkdir -vp "${SEMAPHORE_GIT_DIR}" "${GOPATH}/bin"
|
- mkdir -vp "${SEMAPHORE_GIT_DIR}" "${GOPATH}/bin"
|
||||||
- export GOPROXY=https://proxy.golang.org,direct
|
- export GOPROXY=https://proxy.golang.org,direct
|
||||||
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${GOPATH}/bin" v1.43.0
|
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${GOPATH}/bin" v1.44.0
|
||||||
- curl -sSfL https://gist.githubusercontent.com/traefiker/6d7ac019c11d011e4f131bb2cca8900e/raw/goreleaser.sh | bash -s -- -b "${GOPATH}/bin"
|
- curl -sSfL https://gist.githubusercontent.com/traefiker/6d7ac019c11d011e4f131bb2cca8900e/raw/goreleaser.sh | bash -s -- -b "${GOPATH}/bin"
|
||||||
- checkout
|
- checkout
|
||||||
- cache restore traefik-$(checksum go.sum)
|
- cache restore traefik-$(checksum go.sum)
|
||||||
|
|
|
@ -14,7 +14,7 @@ RUN mkdir -p /usr/local/bin \
|
||||||
| tar -xzC /usr/local/bin --transform 's#^.+/##x'
|
| tar -xzC /usr/local/bin --transform 's#^.+/##x'
|
||||||
|
|
||||||
# Download golangci-lint binary to bin folder in $GOPATH
|
# Download golangci-lint binary to bin folder in $GOPATH
|
||||||
RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $GOPATH/bin v1.43.0
|
RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $GOPATH/bin v1.44.0
|
||||||
|
|
||||||
# Download misspell binary to bin folder in $GOPATH
|
# Download misspell binary to bin folder in $GOPATH
|
||||||
RUN curl -sfL https://raw.githubusercontent.com/client9/misspell/master/install-misspell.sh | bash -s -- -b $GOPATH/bin v0.3.4
|
RUN curl -sfL https://raw.githubusercontent.com/client9/misspell/master/install-misspell.sh | bash -s -- -b $GOPATH/bin v0.3.4
|
||||||
|
|
|
@ -277,7 +277,6 @@ func (s *ConsulCatalogSuite) TestDefaultConsulService(c *check.C) {
|
||||||
ConsulAddress string
|
ConsulAddress string
|
||||||
DefaultRule string
|
DefaultRule string
|
||||||
}{
|
}{
|
||||||
|
|
||||||
ConsulAddress: s.consulURL,
|
ConsulAddress: s.consulURL,
|
||||||
DefaultRule: "Host(`{{ normalize .Name }}.consul.localhost`)",
|
DefaultRule: "Host(`{{ normalize .Name }}.consul.localhost`)",
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,7 +186,6 @@ func TestGetRoutersByEntryPoints(t *testing.T) {
|
||||||
"webs": {
|
"webs": {
|
||||||
"bar": {
|
"bar": {
|
||||||
Router: &dynamic.Router{
|
Router: &dynamic.Router{
|
||||||
|
|
||||||
EntryPoints: []string{"webs"},
|
EntryPoints: []string{"webs"},
|
||||||
Service: "bar-service@myprovider",
|
Service: "bar-service@myprovider",
|
||||||
Rule: "Host(`foo.bar`)",
|
Rule: "Host(`foo.bar`)",
|
||||||
|
|
|
@ -186,7 +186,6 @@ func TestGetTCPRoutersByEntryPoints(t *testing.T) {
|
||||||
"webs": {
|
"webs": {
|
||||||
"bar": {
|
"bar": {
|
||||||
TCPRouter: &dynamic.TCPRouter{
|
TCPRouter: &dynamic.TCPRouter{
|
||||||
|
|
||||||
EntryPoints: []string{"webs"},
|
EntryPoints: []string{"webs"},
|
||||||
Service: "bar-service@myprovider",
|
Service: "bar-service@myprovider",
|
||||||
Rule: "HostSNI(`foo.bar`)",
|
Rule: "HostSNI(`foo.bar`)",
|
||||||
|
|
|
@ -169,7 +169,6 @@ func TestGetUDPRoutersByEntryPoints(t *testing.T) {
|
||||||
"webs": {
|
"webs": {
|
||||||
"bar": {
|
"bar": {
|
||||||
UDPRouter: &dynamic.UDPRouter{
|
UDPRouter: &dynamic.UDPRouter{
|
||||||
|
|
||||||
EntryPoints: []string{"webs"},
|
EntryPoints: []string{"webs"},
|
||||||
Service: "bar-service@myprovider",
|
Service: "bar-service@myprovider",
|
||||||
},
|
},
|
||||||
|
|
|
@ -126,7 +126,6 @@ func TestStripPrefix(t *testing.T) {
|
||||||
{
|
{
|
||||||
desc: "earlier prefix matching",
|
desc: "earlier prefix matching",
|
||||||
config: dynamic.StripPrefix{
|
config: dynamic.StripPrefix{
|
||||||
|
|
||||||
Prefixes: []string{"/stat", "/stat/us"},
|
Prefixes: []string{"/stat", "/stat/us"},
|
||||||
},
|
},
|
||||||
path: "/stat/us",
|
path: "/stat/us",
|
||||||
|
|
|
@ -31,7 +31,6 @@ const resyncPeriod = 10 * time.Minute
|
||||||
// The stores can then be accessed via the Get* functions.
|
// The stores can then be accessed via the Get* functions.
|
||||||
type Client interface {
|
type Client interface {
|
||||||
WatchAll(namespaces []string, stopCh <-chan struct{}) (<-chan interface{}, error)
|
WatchAll(namespaces []string, stopCh <-chan struct{}) (<-chan interface{}, error)
|
||||||
|
|
||||||
GetIngressRoutes() []*v1alpha1.IngressRoute
|
GetIngressRoutes() []*v1alpha1.IngressRoute
|
||||||
GetIngressRouteTCPs() []*v1alpha1.IngressRouteTCP
|
GetIngressRouteTCPs() []*v1alpha1.IngressRouteTCP
|
||||||
GetIngressRouteUDPs() []*v1alpha1.IngressRouteUDP
|
GetIngressRouteUDPs() []*v1alpha1.IngressRouteUDP
|
||||||
|
@ -42,7 +41,6 @@ type Client interface {
|
||||||
GetTLSOptions() []*v1alpha1.TLSOption
|
GetTLSOptions() []*v1alpha1.TLSOption
|
||||||
GetServersTransports() []*v1alpha1.ServersTransport
|
GetServersTransports() []*v1alpha1.ServersTransport
|
||||||
GetTLSStores() []*v1alpha1.TLSStore
|
GetTLSStores() []*v1alpha1.TLSStore
|
||||||
|
|
||||||
GetService(namespace, name string) (*corev1.Service, bool, error)
|
GetService(namespace, name string) (*corev1.Service, bool, error)
|
||||||
GetSecret(namespace, name string) (*corev1.Secret, bool, error)
|
GetSecret(namespace, name string) (*corev1.Secret, bool, error)
|
||||||
GetEndpoints(namespace, name string) (*corev1.Endpoints, bool, error)
|
GetEndpoints(namespace, name string) (*corev1.Endpoints, bool, error)
|
||||||
|
|
|
@ -50,7 +50,6 @@ func (reh *resourceEventHandler) OnDelete(obj interface{}) {
|
||||||
// The stores can then be accessed via the Get* functions.
|
// The stores can then be accessed via the Get* functions.
|
||||||
type Client interface {
|
type Client interface {
|
||||||
WatchAll(namespaces []string, stopCh <-chan struct{}) (<-chan interface{}, error)
|
WatchAll(namespaces []string, stopCh <-chan struct{}) (<-chan interface{}, error)
|
||||||
|
|
||||||
GetGatewayClasses() ([]*v1alpha2.GatewayClass, error)
|
GetGatewayClasses() ([]*v1alpha2.GatewayClass, error)
|
||||||
UpdateGatewayStatus(gateway *v1alpha2.Gateway, gatewayStatus v1alpha2.GatewayStatus) error
|
UpdateGatewayStatus(gateway *v1alpha2.Gateway, gatewayStatus v1alpha2.GatewayStatus) error
|
||||||
UpdateGatewayClassStatus(gatewayClass *v1alpha2.GatewayClass, condition metav1.Condition) error
|
UpdateGatewayClassStatus(gatewayClass *v1alpha2.GatewayClass, condition metav1.Condition) error
|
||||||
|
@ -58,7 +57,6 @@ type Client interface {
|
||||||
GetHTTPRoutes(namespaces []string) ([]*v1alpha2.HTTPRoute, error)
|
GetHTTPRoutes(namespaces []string) ([]*v1alpha2.HTTPRoute, error)
|
||||||
GetTCPRoutes(namespaces []string) ([]*v1alpha2.TCPRoute, error)
|
GetTCPRoutes(namespaces []string) ([]*v1alpha2.TCPRoute, error)
|
||||||
GetTLSRoutes(namespaces []string) ([]*v1alpha2.TLSRoute, error)
|
GetTLSRoutes(namespaces []string) ([]*v1alpha2.TLSRoute, error)
|
||||||
|
|
||||||
GetService(namespace, name string) (*corev1.Service, bool, error)
|
GetService(namespace, name string) (*corev1.Service, bool, error)
|
||||||
GetSecret(namespace, name string) (*corev1.Secret, bool, error)
|
GetSecret(namespace, name string) (*corev1.Secret, bool, error)
|
||||||
GetEndpoints(namespace, name string) (*corev1.Endpoints, bool, error)
|
GetEndpoints(namespace, name string) (*corev1.Endpoints, bool, error)
|
||||||
|
|
|
@ -46,7 +46,6 @@ func TestRuntimeConfiguration(t *testing.T) {
|
||||||
},
|
},
|
||||||
"bar": {
|
"bar": {
|
||||||
UDPRouter: &dynamic.UDPRouter{
|
UDPRouter: &dynamic.UDPRouter{
|
||||||
|
|
||||||
EntryPoints: []string{"web"},
|
EntryPoints: []string{"web"},
|
||||||
Service: "foo-service",
|
Service: "foo-service",
|
||||||
},
|
},
|
||||||
|
@ -78,7 +77,6 @@ func TestRuntimeConfiguration(t *testing.T) {
|
||||||
},
|
},
|
||||||
"bar": {
|
"bar": {
|
||||||
UDPRouter: &dynamic.UDPRouter{
|
UDPRouter: &dynamic.UDPRouter{
|
||||||
|
|
||||||
EntryPoints: []string{"web"},
|
EntryPoints: []string{"web"},
|
||||||
Service: "foo-service",
|
Service: "foo-service",
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue