From 86bb87b787b0d6be35af5d1126dd87e5e667e978 Mon Sep 17 00:00:00 2001 From: changluyi Date: Wed, 16 Aug 2023 10:07:47 +0800 Subject: [PATCH] test --- .github/workflows/golangci.yaml | 51 ++++++++++++++++----------------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/.github/workflows/golangci.yaml b/.github/workflows/golangci.yaml index 2028efb1bcc..c3c52770048 100644 --- a/.github/workflows/golangci.yaml +++ b/.github/workflows/golangci.yaml @@ -1,11 +1,19 @@ +name: golangci-lint2 +on: + push: + tags: + - v* + branches: + - master + - main + pull_request: + run: timeout: 15m skip-files: # Skip autogenerated files. - - ^.*\.(pb|y)\.go$ skip-dirs: # Copied it from a different source - - storage/remote/otlptranslator/prometheusremotewrite output: sort-results: true @@ -37,36 +45,25 @@ linters-settings: rules: main: deny: - - pkg: "sync/atomic" - desc: "Use go.uber.org/atomic instead of sync/atomic" - - pkg: "github.com/stretchr/testify/assert" - desc: "Use github.com/stretchr/testify/require instead of github.com/stretchr/testify/assert" - - pkg: "github.com/go-kit/kit/log" - desc: "Use github.com/go-kit/log instead of github.com/go-kit/kit/log" - - pkg: "io/ioutil" - desc: "Use corresponding 'os' or 'io' functions instead." - - pkg: "regexp" - desc: "Use github.com/grafana/regexp instead of regexp" +# - pkg: "sync/atomic" +# desc: "Use go.uber.org/atomic instead of sync/atomic" +# - pkg: "github.com/stretchr/testify/assert" +# desc: "Use github.com/stretchr/testify/require instead of github.com/stretchr/testify/assert" +# - pkg: "github.com/go-kit/kit/log" +# desc: "Use github.com/go-kit/log instead of github.com/go-kit/kit/log" +# - pkg: "io/ioutil" +# desc: "Use corresponding 'os' or 'io' functions instead." +# - pkg: "regexp" +# desc: "Use github.com/grafana/regexp instead of regexp" errcheck: exclude-functions: - # Don't flag lines such as "io.Copy(io.Discard, resp.Body)". - io.Copy - # The next two are used in HTTP handlers, any error is handled by the server itself. - - io.WriteString - - (net/http.ResponseWriter).Write - # No need to check for errors on server's shutdown. - - (*net/http.Server).Shutdown - # Never check for logger errors. - - (github.com/go-kit/log.Logger).Log - # Never check for rollback errors as Rollback() is called when a previous error was detected. - - (github.com/prometheus/prometheus/storage.Appender).Rollback goimports: - local-prefixes: github.com/prometheus/prometheus + local-prefixes: github.com/kubeovn/kube-ovn gofumpt: extra-rules: true revive: rules: - # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter - - name: unused-parameter - severity: warning - disabled: true \ No newline at end of file +# - name: unused-parameter +# severity: warning +# disabled: true \ No newline at end of file