Skip to content

Commit a1676f3

Browse files
committed
lint
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
1 parent c4e7cc4 commit a1676f3

2 files changed

Lines changed: 16 additions & 15 deletions

File tree

pkg/attestation/crafter/materials/cyclonedxjson_test.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -227,34 +227,34 @@ func TestCyclonedxJSONCraft(t *testing.T) {
227227

228228
func TestCycloneDXJSONCraftNoStrictValidation(t *testing.T) {
229229
testCases := []struct {
230-
name string
231-
filePath string
230+
name string
231+
filePath string
232232
noStrictValidation bool
233-
wantErr string
233+
wantErr string
234234
}{
235235
{
236-
name: "invalid schema without skip flag fails",
237-
filePath: "./testdata/sbom.cyclonedx-invalid-schema.json",
236+
name: "invalid schema without skip flag fails",
237+
filePath: "./testdata/sbom.cyclonedx-invalid-schema.json",
238238
noStrictValidation: false,
239-
wantErr: "invalid cyclonedx sbom file",
239+
wantErr: "invalid cyclonedx sbom file",
240240
},
241241
{
242-
name: "invalid schema with skip flag succeeds",
243-
filePath: "./testdata/sbom.cyclonedx-invalid-schema.json",
242+
name: "invalid schema with skip flag succeeds",
243+
filePath: "./testdata/sbom.cyclonedx-invalid-schema.json",
244244
noStrictValidation: true,
245-
wantErr: "",
245+
wantErr: "",
246246
},
247247
{
248-
name: "non-cyclonedx file fails even with skip flag",
249-
filePath: "./testdata/random.json",
248+
name: "non-cyclonedx file fails even with skip flag",
249+
filePath: "./testdata/random.json",
250250
noStrictValidation: true,
251-
wantErr: "invalid cyclonedx sbom file",
251+
wantErr: "invalid cyclonedx sbom file",
252252
},
253253
{
254-
name: "valid file works without skip flag",
255-
filePath: "./testdata/sbom.cyclonedx.json",
254+
name: "valid file works without skip flag",
255+
filePath: "./testdata/sbom.cyclonedx.json",
256256
noStrictValidation: false,
257-
wantErr: "",
257+
wantErr: "",
258258
},
259259
}
260260

pkg/attestation/crafter/materials/materials.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ type CraftingOpts struct {
210210
NoStrictValidation bool
211211
}
212212

213+
//nolint:gocyclo
213214
func Craft(ctx context.Context, materialSchema *schemaapi.CraftingSchema_Material, value string, casBackend *casclient.CASBackend, ociAuth authn.Keychain, logger *zerolog.Logger, opts *CraftingOpts) (*api.Attestation_Material, error) {
214215
var crafter Craftable
215216
var err error

0 commit comments

Comments
 (0)