mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-21 14:11:56 +00:00
.github: Bump golangci/golangci-lint-action from 6.5.0 to 7.0.0 (#15476)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.5.0 to 7.0.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](2226d7cb06...1481404843
)
---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
parent
4cb9d5c183
commit
d8e3bce0b4
4
.github/workflows/golangci-lint.yml
vendored
4
.github/workflows/golangci-lint.yml
vendored
@ -31,9 +31,9 @@ jobs:
|
|||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0
|
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
|
||||||
with:
|
with:
|
||||||
version: v1.64
|
version: v2.0.2
|
||||||
|
|
||||||
# Show only new issues if it's a pull request.
|
# Show only new issues if it's a pull request.
|
||||||
only-new-issues: true
|
only-new-issues: true
|
||||||
|
187
.golangci.yml
187
.golangci.yml
@ -1,97 +1,110 @@
|
|||||||
|
version: "2"
|
||||||
|
# Configuration for how we run golangci-lint
|
||||||
|
# Timeout of 5m was the default in v1.
|
||||||
|
run:
|
||||||
|
timeout: 5m
|
||||||
linters:
|
linters:
|
||||||
# Don't enable any linters by default; just the ones that we explicitly
|
# Don't enable any linters by default; just the ones that we explicitly
|
||||||
# enable in the list below.
|
# enable in the list below.
|
||||||
disable-all: true
|
default: none
|
||||||
enable:
|
enable:
|
||||||
- bidichk
|
- bidichk
|
||||||
- gofmt
|
|
||||||
- goimports
|
|
||||||
- govet
|
- govet
|
||||||
- misspell
|
- misspell
|
||||||
- revive
|
- revive
|
||||||
|
settings:
|
||||||
# Configuration for how we run golangci-lint
|
|
||||||
run:
|
|
||||||
timeout: 5m
|
|
||||||
|
|
||||||
issues:
|
|
||||||
# Excluding configuration per-path, per-linter, per-text and per-source
|
|
||||||
exclude-rules:
|
|
||||||
# These are forks of an upstream package and thus are exempt from stylistic
|
|
||||||
# changes that would make pulling in upstream changes harder.
|
|
||||||
- path: tempfork/.*\.go
|
|
||||||
text: "File is not `gofmt`-ed with `-s` `-r 'interface{} -> any'`"
|
|
||||||
- path: util/singleflight/.*\.go
|
|
||||||
text: "File is not `gofmt`-ed with `-s` `-r 'interface{} -> any'`"
|
|
||||||
|
|
||||||
# Per-linter settings are contained in this top-level key
|
|
||||||
linters-settings:
|
|
||||||
gofmt:
|
|
||||||
rewrite-rules:
|
|
||||||
- pattern: 'interface{}'
|
|
||||||
replacement: 'any'
|
|
||||||
|
|
||||||
govet:
|
|
||||||
# Matches what we use in corp as of 2023-12-07
|
# Matches what we use in corp as of 2023-12-07
|
||||||
enable:
|
govet:
|
||||||
- asmdecl
|
enable:
|
||||||
- assign
|
- asmdecl
|
||||||
- atomic
|
- assign
|
||||||
- bools
|
- atomic
|
||||||
- buildtag
|
- bools
|
||||||
- cgocall
|
- buildtag
|
||||||
- copylocks
|
- cgocall
|
||||||
- deepequalerrors
|
- copylocks
|
||||||
- errorsas
|
- deepequalerrors
|
||||||
- framepointer
|
- errorsas
|
||||||
- httpresponse
|
- framepointer
|
||||||
- ifaceassert
|
- httpresponse
|
||||||
- loopclosure
|
- ifaceassert
|
||||||
- lostcancel
|
- loopclosure
|
||||||
- nilfunc
|
- lostcancel
|
||||||
- nilness
|
- nilfunc
|
||||||
- printf
|
- nilness
|
||||||
- reflectvaluecompare
|
- printf
|
||||||
- shift
|
- reflectvaluecompare
|
||||||
- sigchanyzer
|
- shift
|
||||||
- sortslice
|
- sigchanyzer
|
||||||
- stdmethods
|
- sortslice
|
||||||
- stringintconv
|
- stdmethods
|
||||||
- structtag
|
- stringintconv
|
||||||
- testinggoroutine
|
- structtag
|
||||||
- tests
|
- testinggoroutine
|
||||||
- unmarshal
|
- tests
|
||||||
- unreachable
|
- unmarshal
|
||||||
- unsafeptr
|
- unreachable
|
||||||
- unusedresult
|
- unsafeptr
|
||||||
settings:
|
- unusedresult
|
||||||
printf:
|
settings:
|
||||||
# List of print function names to check (in addition to default)
|
printf:
|
||||||
funcs:
|
# List of print function names to check (in addition to default)
|
||||||
- github.com/tailscale/tailscale/types/logger.Discard
|
funcs:
|
||||||
# NOTE(andrew-d): this doesn't currently work because the printf
|
- github.com/tailscale/tailscale/types/logger.Discard
|
||||||
# analyzer doesn't support type declarations
|
# NOTE(andrew-d): this doesn't currently work because the printf
|
||||||
#- github.com/tailscale/tailscale/types/logger.Logf
|
# analyzer doesn't support type declarations
|
||||||
|
#- github.com/tailscale/tailscale/types/logger.Logf
|
||||||
revive:
|
revive:
|
||||||
enable-all-rules: false
|
enable-all-rules: false
|
||||||
ignore-generated-header: true
|
rules:
|
||||||
|
- name: atomic
|
||||||
|
- name: context-keys-type
|
||||||
|
- name: defer
|
||||||
|
arguments: [[
|
||||||
|
# Calling 'recover' at the time a defer is registered (i.e. "defer recover()") has no effect.
|
||||||
|
"immediate-recover",
|
||||||
|
# Calling 'recover' outside of a deferred function has no effect
|
||||||
|
"recover",
|
||||||
|
# Returning values from a deferred function has no effect
|
||||||
|
"return",
|
||||||
|
]]
|
||||||
|
- name: duplicated-imports
|
||||||
|
- name: errorf
|
||||||
|
- name: string-of-int
|
||||||
|
- name: time-equal
|
||||||
|
- name: unconditional-recursion
|
||||||
|
- name: useless-break
|
||||||
|
- name: waitgroup-by-value
|
||||||
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
presets:
|
||||||
|
- comments
|
||||||
|
- common-false-positives
|
||||||
|
- legacy
|
||||||
|
- std-error-handling
|
||||||
rules:
|
rules:
|
||||||
- name: atomic
|
# These are forks of an upstream package and thus are exempt from stylistic
|
||||||
- name: context-keys-type
|
# changes that would make pulling in upstream changes harder.
|
||||||
- name: defer
|
- path: tempfork/.*\.go
|
||||||
arguments: [[
|
text: File is not `gofmt`-ed with `-s` `-r 'interface{} -> any'`
|
||||||
# Calling 'recover' at the time a defer is registered (i.e. "defer recover()") has no effect.
|
- path: util/singleflight/.*\.go
|
||||||
"immediate-recover",
|
text: File is not `gofmt`-ed with `-s` `-r 'interface{} -> any'`
|
||||||
# Calling 'recover' outside of a deferred function has no effect
|
paths:
|
||||||
"recover",
|
- third_party$
|
||||||
# Returning values from a deferred function has no effect
|
- builtin$
|
||||||
"return",
|
- examples$
|
||||||
]]
|
formatters:
|
||||||
- name: duplicated-imports
|
enable:
|
||||||
- name: errorf
|
- gofmt
|
||||||
- name: string-of-int
|
- goimports
|
||||||
- name: time-equal
|
settings:
|
||||||
- name: unconditional-recursion
|
gofmt:
|
||||||
- name: useless-break
|
rewrite-rules:
|
||||||
- name: waitgroup-by-value
|
- pattern: interface{}
|
||||||
|
replacement: any
|
||||||
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
paths:
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
Loading…
x
Reference in New Issue
Block a user