chore: Bump golangci-lint from v1.51.0 to v1.51.2 (#12782)

Co-authored-by: Pawel Zak <Pawel Zak>
This commit is contained in:
Paweł Żak 2023-03-03 10:06:54 +01:00 committed by GitHub
parent 9e7be56875
commit 5c234d8749
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 4 additions and 9 deletions

View File

@ -25,5 +25,5 @@ jobs:
- name: golangci-lint - name: golangci-lint
uses: golangci/golangci-lint-action@v3 uses: golangci/golangci-lint-action@v3
with: with:
version: v1.51.0 version: v1.51.2
args: --timeout 15m0s --verbose --out-${NO_FUTURE}format tab args: --timeout 15m0s --verbose --out-${NO_FUTURE}format tab

View File

@ -173,7 +173,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.51.0 go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2
@echo "Installing markdownlint" @echo "Installing markdownlint"
npm install -g markdownlint-cli npm install -g markdownlint-cli

View File

@ -16,7 +16,6 @@ func ParseImage(image string) (imageName string, imageVersion string) {
domain, remainder = image[:i], image[i+1:] domain, remainder = image[:i], image[i+1:]
} }
imageName = ""
imageVersion = "unknown" imageVersion = "unknown"
i = strings.LastIndex(remainder, ":") i = strings.LastIndex(remainder, ":")
if i > -1 { if i > -1 {

View File

@ -44,7 +44,7 @@ func TestSnakeCase(t *testing.T) {
} }
var ( var (
sleepbin, _ = exec.LookPath("sleep") //nolint:unused // Used in skipped tests sleepbin, _ = exec.LookPath("sleep")
echobin, _ = exec.LookPath("echo") echobin, _ = exec.LookPath("echo")
shell, _ = exec.LookPath("sh") shell, _ = exec.LookPath("sh")
) )

View File

@ -79,8 +79,6 @@ func TestReadsMetricsFromKafkaIntegration(t *testing.T) {
} }
// Waits for the metric that was sent to the kafka broker to arrive at the kafka consumer // Waits for the metric that was sent to the kafka broker to arrive at the kafka consumer
//
//nolint:unused // Used in skipped tests
func waitForPoint(acc *testutil.Accumulator, t *testing.T) { func waitForPoint(acc *testutil.Accumulator, t *testing.T) {
// Give the kafka container up to 2 seconds to get the point to the consumer // Give the kafka container up to 2 seconds to get the point to the consumer
ticker := time.NewTicker(5 * time.Millisecond) ticker := time.NewTicker(5 * time.Millisecond)

View File

@ -201,7 +201,7 @@ func processPingOutput(out string) (stats, error) {
} }
func getPacketStats(line string) (trans int, recv int, err error) { func getPacketStats(line string) (trans int, recv int, err error) {
trans, recv = 0, 0 recv = 0
stats := strings.Split(line, ", ") stats := strings.Split(line, ", ")
// Transmitted packets // Transmitted packets

View File

@ -72,7 +72,6 @@ func parseConnectionStringKeyValue(connectionString string) (sqlInstance string,
// parseConnectionStringURL parses a URL-formatted connection string and returns the SQL instance and database name // parseConnectionStringURL parses a URL-formatted connection string and returns the SQL instance and database name
func parseConnectionStringURL(connectionString string) (sqlInstance string, databaseName string) { func parseConnectionStringURL(connectionString string) (sqlInstance string, databaseName string) {
sqlInstance = emptySQLInstance
databaseName = emptyDatabaseName databaseName = emptyDatabaseName
u, err := url.Parse(connectionString) u, err := url.Parse(connectionString)
@ -81,7 +80,6 @@ func parseConnectionStringURL(connectionString string) (sqlInstance string, data
} }
sqlInstance = u.Hostname() sqlInstance = u.Hostname()
if len(u.Path) > 1 { if len(u.Path) > 1 {
// There was a SQL instance name specified in addition to the host // There was a SQL instance name specified in addition to the host
// E.g. "the.host.com:1234/InstanceName" or "the.host.com/InstanceName" // E.g. "the.host.com:1234/InstanceName" or "the.host.com/InstanceName"