Skip to content

Commit

Permalink
chore: Bump golangci-lint from v1.51.0 to v1.51.2 (#12782)
Browse files Browse the repository at this point in the history
Co-authored-by: Pawel Zak <Pawel Zak>
  • Loading branch information
zak-pawel authored Mar 3, 2023
1 parent 9e7be56 commit 5c234d8
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.51.0
version: v1.51.2
args: --timeout 15m0s --verbose --out-${NO_FUTURE}format tab
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ vet:
.PHONY: lint-install
lint-install:
@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"
npm install -g markdownlint-cli
Expand Down
1 change: 0 additions & 1 deletion internal/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ func ParseImage(image string) (imageName string, imageVersion string) {
domain, remainder = image[:i], image[i+1:]
}

imageName = ""
imageVersion = "unknown"
i = strings.LastIndex(remainder, ":")
if i > -1 {
Expand Down
2 changes: 1 addition & 1 deletion internal/internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestSnakeCase(t *testing.T) {
}

var (
sleepbin, _ = exec.LookPath("sleep") //nolint:unused // Used in skipped tests
sleepbin, _ = exec.LookPath("sleep")
echobin, _ = exec.LookPath("echo")
shell, _ = exec.LookPath("sh")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
//nolint:unused // Used in skipped tests
func waitForPoint(acc *testutil.Accumulator, t *testing.T) {
// Give the kafka container up to 2 seconds to get the point to the consumer
ticker := time.NewTicker(5 * time.Millisecond)
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/ping/ping_notwindows.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func processPingOutput(out string) (stats, error) {
}

func getPacketStats(line string) (trans int, recv int, err error) {
trans, recv = 0, 0
recv = 0

stats := strings.Split(line, ", ")
// Transmitted packets
Expand Down
2 changes: 0 additions & 2 deletions plugins/inputs/sqlserver/connectionstring.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
func parseConnectionStringURL(connectionString string) (sqlInstance string, databaseName string) {
sqlInstance = emptySQLInstance
databaseName = emptyDatabaseName

u, err := url.Parse(connectionString)
Expand All @@ -81,7 +80,6 @@ func parseConnectionStringURL(connectionString string) (sqlInstance string, data
}

sqlInstance = u.Hostname()

if len(u.Path) > 1 {
// There was a SQL instance name specified in addition to the host
// E.g. "the.host.com:1234/InstanceName" or "the.host.com/InstanceName"
Expand Down

0 comments on commit 5c234d8

Please sign in to comment.