Skip to content

Run golangci-lint on macOS and Windows; fix lint issues #3586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexandear
Copy link
Member

@alexandear alexandear commented May 26, 2025

This PR adds golangci-lint step to run on Windows and macOS. And fixes a few lint issues that appeared on Windows and macOS.

Fixes #3585

@alexandear alexandear force-pushed the chore/run-golangci-macos branch from 11e316a to 5d949a6 Compare May 26, 2025 10:11
@alexandear alexandear changed the title Run golangci-lint on MacOS Run golangci-lint on MacOS and Windows May 26, 2025
@alexandear alexandear force-pushed the chore/run-golangci-macos branch from 5d949a6 to 687debf Compare May 26, 2025 10:31
@alexandear alexandear changed the title Run golangci-lint on MacOS and Windows Run golangci-lint on MacOS and Windows; fix lint issues May 26, 2025
@alexandear alexandear force-pushed the chore/run-golangci-macos branch from 687debf to 34584e0 Compare May 26, 2025 10:37
@alexandear alexandear changed the title Run golangci-lint on MacOS and Windows; fix lint issues Run golangci-lint on macOS and Windows; fix lint issues May 26, 2025
@alexandear alexandear marked this pull request as ready for review May 26, 2025 10:52
return err
}
a.instSSHAddress = sshAddr
a.instSSHAddress = store.InstanceSSHAddress
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Member Author

@alexandear alexandear May 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GetSSHAddress for Unix and Windows is the same:

func GetSSHAddress(_ string) (string, error) {
return "127.0.0.1", nil
}

func GetSSHAddress(instName string) (string, error) {
return "127.0.0.1", nil
}

So, I decided to refactor and return "127.0.0.1" (const InstanceSSHAddress).

@alexandear alexandear force-pushed the chore/run-golangci-macos branch 6 times, most recently from f07eb9f to ad59340 Compare May 27, 2025 10:30
timeout-minutes: 30
strategy:
matrix:
runs-on: [ubuntu-24.04, macos-15-large, windows-2022-8-cores]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to use larger instances?

@AkihiroSuda AkihiroSuda added this to the v1.1.2 milestone May 27, 2025
@alexandear alexandear marked this pull request as draft May 27, 2025 10:56
@alexandear alexandear force-pushed the chore/run-golangci-macos branch 8 times, most recently from 917eb08 to 666e2c3 Compare May 28, 2025 13:31
@alexandear alexandear marked this pull request as ready for review May 28, 2025 13:31
@alexandear alexandear requested a review from AkihiroSuda May 28, 2025 13:37
@alexandear alexandear force-pushed the chore/run-golangci-macos branch from 666e2c3 to 2673f4c Compare May 28, 2025 14:17
@alexandear alexandear force-pushed the chore/run-golangci-macos branch from 2673f4c to 4ea83b8 Compare May 28, 2025 15:16
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.

golangci-lint should be run for all build tags, not just for Linux
2 participants