Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
changluyi committed Aug 16, 2023
1 parent 44f0a86 commit 86bb87b
Showing 1 changed file with 24 additions and 27 deletions.
51 changes: 24 additions & 27 deletions .github/workflows/golangci.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
# - name: unused-parameter
# severity: warning
# disabled: true

0 comments on commit 86bb87b

Please sign in to comment.