Skip to content

Commit

Permalink
update golangci-lint to 1.63.4
Browse files Browse the repository at this point in the history
  • Loading branch information
szkiba committed Jan 6, 2025
1 parent 5fead5d commit 27882f2
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ jobs:
- name: Go linter
uses: golangci/golangci-lint-action@v6
with:
version: v1.57.2
version: v1.63.4
args: --timeout=60m
install-mode: binary
56 changes: 28 additions & 28 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v1.57.2
# v1.63.4
# Please don't remove the first line. It uses in CI to determine the golangci version
run:
timeout: 5m
Expand All @@ -15,32 +15,32 @@ issues:
exclude-use-default: false

exclude-rules:
# Exclude duplicate code and function length and complexity checking in test
# files (due to common repeats and long functions in test code)
- path: _(test|gen)\.go
linters:
- cyclop
- dupl
- gocognit
- funlen
- lll
- forcetypeassert
- path: js\/modules\/k6\/html\/.*\.go
text: "exported: exported "
linters:
- revive
- path: js\/modules\/k6\/http\/.*_test\.go
linters:
# k6/http module's tests are quite complex because they often have several nested levels.
# The module is in maintainance mode, so we don't intend to port the tests to a parallel version.
- paralleltest
- tparallel
- linters:
- staticcheck # Tracked in https://github.com/grafana/xk6-grpc/issues/14
text: "The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated."
- linters:
- forbidigo
text: 'use of `os\.(SyscallError|Signal|Interrupt)` forbidden'
# Exclude duplicate code and function length and complexity checking in test
# files (due to common repeats and long functions in test code)
- path: _(test|gen)\.go
linters:
- cyclop
- dupl
- gocognit
- funlen
- lll
- forcetypeassert
- path: js\/modules\/k6\/html\/.*\.go
text: "exported: exported "
linters:
- revive
- path: js\/modules\/k6\/http\/.*_test\.go
linters:
# k6/http module's tests are quite complex because they often have several nested levels.
# The module is in maintainance mode, so we don't intend to port the tests to a parallel version.
- paralleltest
- tparallel
- linters:
- staticcheck # Tracked in https://github.com/grafana/xk6-grpc/issues/14
text: "The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated."
- linters:
- forbidigo
text: 'use of `os\.(SyscallError|Signal|Interrupt)` forbidden'

linters-settings:
exhaustive:
Expand Down Expand Up @@ -81,7 +81,7 @@ linters:
- errname
- errorlint
- exhaustive
- exportloopref
- copyloopvar
- forbidigo
- forcetypeassert
- funlen
Expand Down
6 changes: 3 additions & 3 deletions metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ func (m *Metrics) WritePrometheus(out io.Writer, namePrefix string, helpPrefix s
fullname := namePrefix + name

if help, hasHelp := metricsHelps[name]; hasHelp {
fmt.Fprintf(out, "# HELP %s %s\n", fullname, helpPrefix+help)
fmt.Fprintf(out, "# HELP %s %s\n", fullname, helpPrefix+help) //nolint:errcheck
}

fmt.Fprintf(out, "# TYPE %s counter\n", fullname)
fmt.Fprintf(out, "%s %d %d\n\n", fullname, value, now)
fmt.Fprintf(out, "# TYPE %s counter\n", fullname) //nolint:errcheck
fmt.Fprintf(out, "%s %d %d\n\n", fullname, value, now) //nolint:errcheck
}

return nil
Expand Down

0 comments on commit 27882f2

Please sign in to comment.