Upgrade to golangci-lint v2 (#775)

Upgrades golangci-lint from v1 to v2. Automated by Linear issue IT-144.

Co-authored-by: CI <ci@pulumi.com>
This commit is contained in:
Pulumi Bot
2026-02-25 12:40:02 -08:00
committed by GitHub
parent 1b95d18edc
commit e5da099be4
11 changed files with 69 additions and 50 deletions

View File

@@ -170,7 +170,7 @@ func hashFile(
if fileMode.IsDir() {
return nil
}
if !(fileMode.IsRegular() || fileMode.Type() == os.ModeSymlink) {
if !fileMode.IsRegular() && fileMode.Type() != os.ModeSymlink {
return nil
}

View File

@@ -98,13 +98,13 @@ func (h *host) builderFor(ctx context.Context, build Build) (*cachedBuilder, err
if err != nil && build.ShouldExec() && strings.HasPrefix(opts.Builder, "cloud-") {
//nolint:revive // Human-readable.
err = errors.Join(err,
errors.New("Make sure you're logged in to Docker (`docker login`) if you're trying to use a cloud builder."),
errors.New("Make sure you have the correct buildx plugin installed (https://github.com/docker/buildx-desktop)."),
errors.New("Make sure you're logged in to Docker (`docker login`) if you're trying to use a cloud builder"), //nolint:lll,staticcheck
errors.New("Make sure you have the correct buildx plugin installed (https://github.com/docker/buildx-desktop)"), //nolint:lll,staticcheck
)
}
if err != nil && build.ShouldExec() {
//nolint:revive // Human-readable.
err = errors.Join(err, errors.New(
err = errors.Join(err, errors.New( //nolint:staticcheck
"Make sure your buildx plugin is executable (`docker buildx version`)"),
)
}
@@ -176,8 +176,8 @@ func (h *host) builderFor(ctx context.Context, build Build) (*cachedBuilder, err
if err != nil && !build.ShouldExec() {
if strings.Contains(err.Error(), "failed to find driver") {
//nolint:revive // Human-readable.
err = errors.Join(err, errors.New(
"Use `exec: true` if you're trying to use Docker Build Cloud or other custom drivers.",
err = errors.Join(err, errors.New( //nolint:staticcheck
"Use `exec: true` if you're trying to use Docker Build Cloud or other custom drivers",
))
}
return nil, fmt.Errorf("loading nodes: %w", err)