8000 Bump golangci/golangci-lint-action from 6 to 7 by dependabot[bot] · Pull Request #1288 · ansible/receptor · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bump golangci/golangci-lint-action from 6 to 7 #1288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on: # yamllint disable-line rule:truthy

env:
DESIRED_GO_VERSION: '1.22'
DESIRED_GOLANGCI_LINT_VERSION: 'v1.60'
DESIRED_GOLANGCI_LINT_VERSION: 'v2.0.2'
DESIRED_PYTHON_VERSION: '3.12'

jobs:
Expand All @@ -24,7 +24,7 @@ jobs:
go-version: ${{ env.DESIRED_GO_VERSION }}

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v7
with:
version: ${{ env.DESIRED_GOLANGCI_LINT_VERSION }}

Expand Down
184 changes: 100 additions & 84 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
---
run:
timeout: 10m

version: "2"
linters:
disable-all: true
default: none
enable:
- asciicheck
- bodyclose
- depguard
- dogsled
- durationcheck
- exportloopref
- gci
- gocritic
- godot
- gofmt
- gofumpt
- goheader
- goimports
- gomodguard
- gosec
- gosimple
- govet
- importas
- ineffassign
Expand All @@ -36,82 +27,107 @@ linters:
- rowserrcheck
- sqlclosecheck
- staticcheck
- stylecheck
- tparallel
- typecheck
- unconvert
- unused
- wastedassign
- whitespace

linters-settings:
depguard:
settings:
depguard:
rules:
main:
files:
- $all
- '!$test'
- '!**/functional/**/*.go'
allow:
- $gostd
- github.com/ansible/receptor/internal/version
- github.com/ansible/receptor/cmd
- github.com/ansible/receptor/pkg
- github.com/creack/pty
- github.com/fsnotify/fsnotify
- github.com/ghjm/cmdline
- github.com/golang-jwt/jwt/v4
- github.com/google/shlex
- github.com/gorilla/websocket
- github.com/jupp0r/go-priority-queue
- github.com/minio/highwayhash
- github.com/pbnjay/memory
- github.com/quic-go/quic-go
- github.com/rogpeppe/go-internal/lockedfile
- github.com/songgao/water
- github.com/vishvananda/netlink
- github.com/spf13/viper
- github.com/spf13/cobra
- k8s.io/api/core
- k8s.io/apimachinery/pkg
- k8s.io/client-go
- github.com/grafana/pyroscope-go
- github.com/sirupsen/logrus
- gopkg.in/yaml.v2
- golang.org/x/net/ipv4
- golang.org/x/net/ipv6
- go.uber.org/goleak
tests:
files:
- $test
- '**/functional/**/*.go'
allow:
- $gostd
- github.com/ansible/receptor/pkg
- github.com/ansible/receptor/tests/utils
- github.com/fortytw2/leaktest
- github.com/fsnotify/fsnotify
- github.com/gorilla/websocket
- github.com/prep/socketpair
- github.com/google/go-cmp/cmp
- k8s.io/api/core/v1
- k8s.io/apimachinery/pkg/api/errors
- k8s.io/apimachinery/pkg/apis/meta/v1
- k8s.io/apimachinery/pkg/fields
- k8s.io/apimachinery/pkg/selection
- k8s.io/apimachinery/pkg/watch
- k8s.io/client-go/kubernetes
- k8s.io/client-go/rest
- k8s.io/client-go/tools/remotecommand
- github.com/quic-go/quic-go
- github.com/quic-go/quic-go/logging
- github.com/AaronH88/quic-go
- github.com/stretchr/testify/assert
- go.uber.org/mock/gomock
- golang.org/x/sys/unix
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
main:
files:
- "$all"
- "!$test"
- "!**/functional/**/*.go"
allow:
- "$gostd"
- "github.com/ansible/receptor/internal/version"
- "github.com/ansible/receptor/cmd"
- "github.com/ansible/receptor/pkg"
- "github.com/creack/pty"
- "github.com/fsnotify/fsnotify"
- "github.com/ghjm/cmdline"
- "github.com/golang-jwt/jwt/v4"
- "github.com/google/shlex"
- "github.com/gorilla/websocket"
- "github.com/jupp0r/go-priority-queue"
- "github.com/minio/highwayhash"
- "github.com/pbnjay/memory"
- "github.com/quic-go/quic-go"
- "github.com/rogpeppe/go-internal/lockedfile"
- "github.com/songgao/water"
- "github.com/vishvananda/netlink"
- "github.com/spf13/viper"
- "github.com/spf13/cobra"
- "k8s.io/api/core"
- "k8s.io/apimachinery/pkg"
- "k8s.io/client-go"
- "github.com/grafana/pyroscope-go"
- "github.com/sirupsen/logrus"
tests:
files:
- "$test"
- "**/functional/**/*.go"
allow:
- "$gostd"
- "github.com/ansible/receptor/pkg"
- "github.com/ansible/receptor/tests/utils"
- "github.com/fortytw2/leaktest"
- "github.com/fsnotify/fsnotify"
- "github.com/gorilla/websocket"
- "github.com/prep/socketpair"
- "github.com/google/go-cmp/cmp"
- "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/fields"
- "k8s.io/apimachinery/pkg/selection"
- "k8s.io/apimachinery/pkg/watch"
- "k8s.io/client-go/kubernetes"
- "k8s.io/client-go/rest"
- "k8s.io/client-go/tools/remotecommand"
- "github.com/quic-go/quic-go"
- "github.com/quic-go/quic-go/logging"
- "github.com/AaronH88/quic-go"
- "github.com/stretchr/testify/assert"

issues:
# Dont commit the following line.
# It will make CI pass without telling you about errors.
# fix: true
exclude:
- "lostcancel" # TODO: Context is not canceled on multiple occasions. Needs more detailed work to be fixed.
- "SA2002|thelper|testinggoroutine" # TODO: Test interface used outside of its routine, tests need to be rewritten.
- "G306" # TODO: Restrict perms of touched files.
- "G402|G404" # TODO: Make TLS more secure.
- "G204" # gosec is throwing a fit, ignore.
...
- path: (.+)\.go$
text: lostcancel
- path: (.+)\.go$
text: SA2002|thelper|testinggoroutine
- path: (.+)\.go$
text: G306
- path: (.+)\.go$
text: G402|G404
- path: (.+)\.go$
text: G204
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
- gofmt
- gofumpt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
Loading
0