Skip to content

ci: update actions and golangci-lint, and fix linting#349

Open
thaJeztah wants to merge 15 commits into
microsoft:mainfrom
thaJeztah:update_ci
Open

ci: update actions and golangci-lint, and fix linting#349
thaJeztah wants to merge 15 commits into
microsoft:mainfrom
thaJeztah:update_ci

Conversation

@thaJeztah

Copy link
Copy Markdown
Contributor

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
```
file.go:237:41: identical-ifelseif-branches: "if...else if" chain with identical branches (lines 237 and 239) (revive)
	if err == nil && n == 0 && len(b) != 0 {
		return 0, io.EOF
	} else if err == windows.ERROR_BROKEN_PIPE { //nolint:errorlint // err is Errno
```

Signed-off-by: Sebastiaan van Stijn <[email protected]>
```
backup_test.go:23:2: redundant-test-main-exit: redundant call to os.Exit in TestMain function, the test runner will handle it automatically as of Go 1.15 (revive)
	os.Exit(m.Run())
	^
```

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
```
tools/mkwinsyscall/mkwinsyscall.go:791:12: SA1019: runtime.GOROOT has been deprecated since Go 1.24: The root used during the Go build will not be meaningful if the binary is copied to another machine. Use the system path to locate
the “go” binary, and use “go env GOROOT” to find its GOROOT. (staticcheck)
	goroot := runtime.GOROOT()
	          ^
```

Signed-off-by: Sebastiaan van Stijn <[email protected]>
- update actions to current version
- update golangci-lint config to v2

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
thaJeztah requested a review from a team as a code owner March 23, 2026 15:44
@thaJeztah

Copy link
Copy Markdown
Contributor Author

@AdityaMittal1306 @helsaawy PTAL

@thaJeztah

Copy link
Copy Markdown
Contributor Author

Looks like something's broken that requires go1.24 (will be raised in #348)

  Error: hvsock_test.go:507:11: stdversion: testing.Context requires go1.24 or later (file is go1.23) (govet)
  	ctx := t.Context()
  	         ^

It requires go1.24, but the module is currently go1.23;

  Error: hvsock_test.go:507:11: stdversion: testing.Context requires go1.24 or later (file is go1.23) (govet)
  	ctx := t.Context()
  	         ^

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah

Copy link
Copy Markdown
Contributor Author

Pushed a commit to fix that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants