Update linter
This commit is contained in:
parent
3ac708ddcb
commit
32920ca65c
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.45.0
|
GOLANGCI_LINT_VERSION: v1.46.2
|
||||||
MISSSPELL_VERSION: v0.3.4
|
MISSSPELL_VERSION: v0.3.4
|
||||||
IN_DOCKER: ""
|
IN_DOCKER: ""
|
||||||
|
|
||||||
|
|
|
@ -119,6 +119,7 @@
|
||||||
"interfacer", # Deprecated
|
"interfacer", # Deprecated
|
||||||
"maligned", # Deprecated
|
"maligned", # Deprecated
|
||||||
"golint", # Deprecated
|
"golint", # Deprecated
|
||||||
|
"execinquery", # Not relevant (SQL)
|
||||||
"sqlclosecheck", # Not relevant (SQL)
|
"sqlclosecheck", # Not relevant (SQL)
|
||||||
"rowserrcheck", # Not relevant (SQL)
|
"rowserrcheck", # Not relevant (SQL)
|
||||||
"lll", # Not relevant
|
"lll", # Not relevant
|
||||||
|
@ -142,6 +143,7 @@
|
||||||
"paralleltest", # Not relevant
|
"paralleltest", # Not relevant
|
||||||
"exhaustive", # Not relevant
|
"exhaustive", # Not relevant
|
||||||
"exhaustivestruct", # Not relevant
|
"exhaustivestruct", # Not relevant
|
||||||
|
"exhaustruct", # duplicate of exhaustivestruct
|
||||||
"goerr113", # Too strict
|
"goerr113", # Too strict
|
||||||
"wrapcheck", # Too strict
|
"wrapcheck", # Too strict
|
||||||
"noctx", # Too strict
|
"noctx", # Too strict
|
||||||
|
@ -156,6 +158,7 @@
|
||||||
"contextcheck", # too many false-positive
|
"contextcheck", # too many false-positive
|
||||||
"containedctx", # too many false-positive
|
"containedctx", # too many false-positive
|
||||||
"maintidx", # kind of duplicate of gocyclo
|
"maintidx", # kind of duplicate of gocyclo
|
||||||
|
"nonamedreturns", # not relevant
|
||||||
]
|
]
|
||||||
|
|
||||||
[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.45.0
|
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${GOPATH}/bin" v1.46.2
|
||||||
- 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)
|
||||||
|
|
|
@ -13,7 +13,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.45.0
|
RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $GOPATH/bin v1.46.2
|
||||||
|
|
||||||
# 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
|
||||||
|
|
|
@ -1072,7 +1072,7 @@ func (s *HTTPSSuite) TestEntryPointHttpsRedirectAndPathModification(c *check.C)
|
||||||
resp.Body.Close()
|
resp.Body.Close()
|
||||||
|
|
||||||
location := resp.Header.Get("Location")
|
location := resp.Header.Get("Location")
|
||||||
expected := fmt.Sprintf("https://%s:8443%s", host, test.path)
|
expected := "https://" + net.JoinHostPort(host, "8443") + test.path
|
||||||
|
|
||||||
c.Assert(location, checker.Equals, expected)
|
c.Assert(location, checker.Equals, expected)
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package integration
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
@ -38,7 +39,8 @@ func (s *TimeoutSuite) TestForwardingTimeouts(c *check.C) {
|
||||||
c.Assert(response.StatusCode, checker.Equals, http.StatusGatewayTimeout)
|
c.Assert(response.StatusCode, checker.Equals, http.StatusGatewayTimeout)
|
||||||
|
|
||||||
// Check that timeout service is available
|
// Check that timeout service is available
|
||||||
statusURL := fmt.Sprintf("http://%s:9000/statusTest?status=200", timeoutEndpointIP)
|
statusURL := fmt.Sprintf("http://%s/statusTest?status=200",
|
||||||
|
net.JoinHostPort(timeoutEndpointIP, "9000"))
|
||||||
c.Assert(try.GetRequest(statusURL, 60*time.Second, try.StatusCodeIs(http.StatusOK)), checker.IsNil)
|
c.Assert(try.GetRequest(statusURL, 60*time.Second, try.StatusCodeIs(http.StatusOK)), checker.IsNil)
|
||||||
|
|
||||||
// This simulates a ResponseHeaderTimeout.
|
// This simulates a ResponseHeaderTimeout.
|
||||||
|
|
Loading…
Reference in a new issue