chore(deps): Bump golangci-lint from v1.62.2 to v1.63.4 (#16360)

This commit is contained in:
Paweł Żak 2025-01-14 09:36:04 +01:00 committed by GitHub
parent d26479b58e
commit f8e7aeceb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 44 additions and 44 deletions

View File

@ -106,7 +106,7 @@ jobs:
- run: 'make check-deps' - run: 'make check-deps'
- run: - run:
name: "Install golangci-lint" name: "Install golangci-lint"
command: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.2 command: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.63.4
- run: - run:
name: "golangci-lint/Linux" name: "golangci-lint/Linux"
# There are only 4 vCPUs available for this executor, so use only 4 instead of the default number # There are only 4 vCPUs available for this executor, so use only 4 instead of the default number
@ -120,7 +120,7 @@ jobs:
- check-changed-files-or-halt - check-changed-files-or-halt
- run: - run:
name: "Install golangci-lint" name: "Install golangci-lint"
command: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.2 command: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.63.4
- run: - run:
name: "golangci-lint/macOS" name: "golangci-lint/macOS"
# There are only 4 vCPUs available for this executor, so use only 4 instead of the default number # There are only 4 vCPUs available for this executor, so use only 4 instead of the default number
@ -134,7 +134,7 @@ jobs:
- check-changed-files-or-halt - check-changed-files-or-halt
- run: - run:
name: "Install golangci-lint" name: "Install golangci-lint"
command: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.2 command: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.63.4
- run: - run:
name: "golangci-lint/Windows" name: "golangci-lint/Windows"
# There are only 4 vCPUs available for this executor, so use only 4 instead of the default number # There are only 4 vCPUs available for this executor, so use only 4 instead of the default number

View File

@ -84,7 +84,7 @@ linters-settings:
# Default: false # Default: false
disable-all: true disable-all: true
# Which checks should be enabled in addition to default checks; can't be combined with 'disabled-checks'. # Which checks should be enabled in addition to default checks; can't be combined with 'disabled-checks'.
# By default, list of stable checks is used (https://go-critic.github.io/overview#checks-overview). # By default, list of stable checks is used (https://go-critic.com/overview#checks-overview).
# To see which checks are enabled run `GL_DEBUG=gocritic golangci-lint run --enable=gocritic`. # To see which checks are enabled run `GL_DEBUG=gocritic golangci-lint run --enable=gocritic`.
enabled-checks: enabled-checks:
# diagnostic # diagnostic
@ -143,7 +143,7 @@ linters-settings:
# Settings passed to gocritic. # Settings passed to gocritic.
# The settings key is the name of a supported gocritic checker. # The settings key is the name of a supported gocritic checker.
# The list of supported checkers can be find in https://go-critic.github.io/overview. # The list of supported checkers can be find in https://go-critic.com/overview.
settings: settings:
hugeParam: hugeParam:
# Size in bytes that makes the warning trigger. # Size in bytes that makes the warning trigger.
@ -159,38 +159,38 @@ linters-settings:
# Available rules: https://github.com/securego/gosec#available-rules # Available rules: https://github.com/securego/gosec#available-rules
# Default: [] - means include all rules # Default: [] - means include all rules
includes: includes:
- G101 - G101 # Look for hard coded credentials
- G102 - G102 # Bind to all interfaces
- G103 - G103 # Audit the use of unsafe block
- G106 - G106 # Audit the use of ssh.InsecureIgnoreHostKey
- G107 - G107 # Url provided to HTTP request as taint input
- G108 - G108 # Profiling endpoint automatically exposed on /debug/pprof
- G109 - G109 # Potential Integer overflow made by strconv.Atoi result conversion to int16/32
- G110 - G110 # Potential DoS vulnerability via decompression bomb
- G111 - G111 # Potential directory traversal
- G112 - G112 # Potential slowloris attack
- G114 - G114 # Use of net/http serve function that has no support for setting timeouts
- G201 - G201 # SQL query construction using format string
- G202 - G202 # SQL query construction using string concatenation
- G203 - G203 # Use of unescaped data in HTML templates
- G301 - G301 # Poor file permissions used when creating a directory
- G302 - G302 # Poor file permissions used with chmod
- G303 - G303 # Creating tempfile using a predictable path
- G305 - G305 # File traversal when extracting zip/tar archive
- G306 - G306 # Poor file permissions used when writing to a new file
- G401 - G401 # Detect the usage of MD5 or SHA1
- G403 - G403 # Ensure minimum RSA key length of 2048 bits
- G404 - G404 # Insecure random number source (rand)
- G405 - G405 # Detect the usage of DES or RC4
- G406 - G406 # Detect the usage of MD4 or RIPEMD160
- G501 - G501 # Import blocklist: crypto/md5
- G502 - G502 # Import blocklist: crypto/des
- G503 - G503 # Import blocklist: crypto/rc4
- G505 - G505 # Import blocklist: crypto/sha1
- G506 - G506 # Import blocklist: golang.org/x/crypto/md4
- G507 - G507 # Import blocklist: golang.org/x/crypto/ripemd160
- G601 - G601 # Implicit memory aliasing of items from a range statement
- G602 - G602 # Slice access out of bounds
# G104, G105, G113, G204, G304, G307, G402, G504 were not enabled intentionally # G104, G105, G113, G204, G304, G307, G402, G504 were not enabled intentionally
# TODO: review G115 when reporting false positives is fixed (https://github.com/securego/gosec/issues/1212) # TODO: review G115 when reporting false positives is fixed (https://github.com/securego/gosec/issues/1212)
# To specify the configuration of rules. # To specify the configuration of rules.
@ -432,6 +432,10 @@ issues:
# Default: 3 # Default: 3
max-same-issues: 0 max-same-issues: 0
# Make issues output unique by line.
# Default: true
uniq-by-line: false
# output configuration options # output configuration options
output: output:
# The formats used to render issues. # The formats used to render issues.
@ -464,10 +468,6 @@ output:
- format: tab - format: tab
path: stdout path: stdout
# Make issues output unique by line.
# Default: true
uniq-by-line: false
# Sort results by the order defined in `sort-order`. # Sort results by the order defined in `sort-order`.
# Default: false # Default: false
sort-results: true sort-results: true
@ -476,7 +476,9 @@ output:
# Default: false # Default: false
show-stats: true show-stats: true
# Options for analysis running.
run: run:
# Timeout for analysis, e.g. 30s, 5m. # Timeout for analysis, e.g. 30s, 5m.
# If the value is lower or equal to 0, the timeout is disabled.
# Default: 1m # Default: 1m
timeout: 10m timeout: 10m

View File

@ -180,7 +180,7 @@ vet:
.PHONY: lint-install .PHONY: lint-install
lint-install: lint-install:
@echo "Installing golangci-lint" @echo "Installing golangci-lint"
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.2 go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.63.4
@echo "Installing markdownlint" @echo "Installing markdownlint"
npm install -g markdownlint-cli npm install -g markdownlint-cli

View File

@ -497,11 +497,9 @@ func (p *Prometheus) gatherURL(u urlAndAddress, acc telegraf.Accumulator) (map[s
var start time.Time var start time.Time
if u.url.Scheme != "unix" { if u.url.Scheme != "unix" {
start = time.Now() start = time.Now()
//nolint:bodyclose // False positive (because of if-else) - body will be closed in `defer`
resp, err = p.client.Do(req) resp, err = p.client.Do(req)
} else { } else {
start = time.Now() start = time.Now()
//nolint:bodyclose // False positive (because of if-else) - body will be closed in `defer`
resp, err = uClient.Do(req) resp, err = uClient.Do(req)
} }
end := time.Since(start).Seconds() end := time.Since(start).Seconds()