Skip to content

Commit

Permalink
Merge branch 'main' into ramonpetgrave64-internal-builder-sigstore-bu…
Browse files Browse the repository at this point in the history
…ndlev2
  • Loading branch information
ramonpetgrave64 committed Oct 24, 2024
2 parents 60e98e9 + edb0d82 commit 739ec4a
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pre-submit.lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ jobs:
with:
go-version-file: "go.mod"
- env:
GOLANGCI_LINT_VERSION: "1.60.3"
GOLANGCI_LINT_CHECKSUM: "4037af8122871f401ed874852a471e54f147ff8ce80f5a304e020503bdb806ef"
GOLANGCI_LINT_VERSION: "1.61.0"
GOLANGCI_LINT_CHECKSUM: "77cb0af99379d9a21d5dc8c38364d060e864a01bd2f3e30b5e8cc550c3a54111"
run: |
set -euo pipefail
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ linters:
# TODO(github.com/slsa-framework/slsa-github-generator/issues/450): enable errorlint
# - errorlint
- exhaustive
- exportloopref
- copyloopvar
# TODO(github.com/slsa-framework/slsa-github-generator/issues/450): enable gci
# - gci
- gochecknoinits
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/slsa-framework/slsa-github-generator

go 1.22.5

toolchain go1.23.0
go 1.23.1

require (
github.com/coreos/go-oidc/v3 v3.11.0
Expand Down
2 changes: 1 addition & 1 deletion internal/builders/go/e2e-presubmits/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module slsa-framework/example-package

go 1.21
go 1.23.1

require github.com/pborman/uuid v1.2.1

Expand Down
1 change: 0 additions & 1 deletion internal/builders/go/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ func Test_runBuild(t *testing.T) {
}

for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
// *** WARNING: do not enable t.Parallel(), because we're writing to environment variables ***.
file, err := os.CreateTemp("", "")
Expand Down
9 changes: 0 additions & 9 deletions internal/builders/go/pkg/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ func Test_isAllowedEnvVariable(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -126,7 +125,6 @@ func Test_getOutputBinaryPath(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -177,7 +175,6 @@ func Test_isAllowedArg(t *testing.T) {
})
}
for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -442,7 +439,6 @@ func Test_generateOutputFilename(t *testing.T) {
}

for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
// Note: disable parallelism to avoid env variable clobbering between tests.
// t.Parallel()
Expand Down Expand Up @@ -595,7 +591,6 @@ func Test_SetArgEnvVariables(t *testing.T) {
}

for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -704,7 +699,6 @@ func Test_generateEnvVariables(t *testing.T) {
}

for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -862,7 +856,6 @@ func Test_generateLdflags(t *testing.T) {
}

for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
// Disable to avoid env clobbering between tests.
// t.Parallel()
Expand Down Expand Up @@ -954,7 +947,6 @@ func Test_generateFlags(t *testing.T) {
}

for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -1024,7 +1016,6 @@ func Test_generateCommand(t *testing.T) {
}

for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down
1 change: 0 additions & 1 deletion internal/builders/go/pkg/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ func Test_ConfigFromFile(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down
2 changes: 1 addition & 1 deletion internal/builders/go/pkg/testdata/go/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/slsa-framework/slsa-github-generator/internal/builders/go/pkg/testdata/go

go 1.19
go 1.23.1
2 changes: 0 additions & 2 deletions internal/utils/marshal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ func Test_MarshalToString(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -91,7 +90,6 @@ func Test_UnmarshalList(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down
4 changes: 0 additions & 4 deletions internal/utils/path_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ func Test_PathIsUnderCurrentDirectory(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -121,7 +120,6 @@ func Test_VerifyAttestationPath(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -193,7 +191,6 @@ func Test_CreateNewFileUnderCurrentDirectory(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
cleanup, err := tempWD()
if err != nil {
Expand Down Expand Up @@ -273,7 +270,6 @@ func Test_PathIsUnderDirectory(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down
2 changes: 0 additions & 2 deletions signing/sigstore/rekor.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ func (r *Rekor) Upload(ctx context.Context, att signing.Attestation) (signing.Lo

var uuid string
for ix, entry := range resp.Payload {
entry := entry

if err := cosign.VerifyTLogEntryOffline(ctx, &entry, pubs); err != nil {
return nil, fmt.Errorf("validating log entry: %w", err)
}
Expand Down

0 comments on commit 739ec4a

Please sign in to comment.