@@ -335,12 +335,14 @@ func TestSLSAProvenanceFromSignatureV1(t *testing.T) {
335335}
336336
337337func TestSLSAProvenanceV1_Subject (t * testing.T ) {
338+ //nolint:staticcheck
338339 mockSubject1 := in_toto.Subject {
339340 Name : "registry.io/example/image@sha256:abc123" ,
340341 Digest : map [string ]string {
341342 "sha256" : "abc123def456" ,
342343 },
343344 }
345+ //nolint:staticcheck
344346 mockSubject2 := in_toto.Subject {
345347 Name : "registry.io/example/artifact@sha256:def456" ,
346348 Digest : map [string ]string {
@@ -350,36 +352,50 @@ func TestSLSAProvenanceV1_Subject(t *testing.T) {
350352 }
351353
352354 tests := []struct {
353- name string
355+ name string
356+ //nolint:staticcheck
354357 statement in_toto.ProvenanceStatementSLSA1
358+ //nolint:staticcheck
355359 expected []in_toto.Subject
356360 wantPanic bool
357361 }{
358362 {
359363 name : "returns single subject successfully" ,
364+ //nolint:staticcheck
360365 statement : in_toto.ProvenanceStatementSLSA1 {
366+ //nolint:staticcheck
361367 StatementHeader : in_toto.StatementHeader {
368+ //nolint:staticcheck
362369 Subject : []in_toto.Subject {mockSubject1 },
363370 },
364371 },
372+ //nolint:staticcheck
365373 expected : []in_toto.Subject {mockSubject1 },
366374 },
367375 {
368376 name : "returns multiple subjects successfully" ,
377+ //nolint:staticcheck
369378 statement : in_toto.ProvenanceStatementSLSA1 {
379+ //nolint:staticcheck
370380 StatementHeader : in_toto.StatementHeader {
381+ //nolint:staticcheck
371382 Subject : []in_toto.Subject {mockSubject1 , mockSubject2 },
372383 },
373384 },
385+ //nolint:staticcheck
374386 expected : []in_toto.Subject {mockSubject1 , mockSubject2 },
375387 },
376388 {
377389 name : "returns empty slice when no subjects" ,
390+ //nolint:staticcheck
378391 statement : in_toto.ProvenanceStatementSLSA1 {
392+ //nolint:staticcheck
379393 StatementHeader : in_toto.StatementHeader {
394+ //nolint:staticcheck
380395 Subject : []in_toto.Subject {},
381396 },
382397 },
398+ //nolint:staticcheck
383399 expected : []in_toto.Subject {},
384400 },
385401 }
@@ -410,8 +426,11 @@ func TestSLSAProvenanceV1_Subject(t *testing.T) {
410426}
411427
412428func TestSLSAProvenanceV1_Type (t * testing.T ) {
429+ //nolint:staticcheck
413430 slsa := slsaProvenanceV1 {
431+ //nolint:staticcheck
414432 statement : in_toto.ProvenanceStatementSLSA1 {
433+ //nolint:staticcheck
415434 StatementHeader : in_toto.StatementHeader {
416435 Type : in_toto .StatementInTotoV01 ,
417436 PredicateType : PredicateSLSAProvenanceV1 ,
@@ -424,8 +443,11 @@ func TestSLSAProvenanceV1_Type(t *testing.T) {
424443}
425444
426445func TestSLSAProvenanceV1_PredicateType (t * testing.T ) {
446+ //nolint:staticcheck
427447 slsa := slsaProvenanceV1 {
448+ //nolint:staticcheck
428449 statement : in_toto.ProvenanceStatementSLSA1 {
450+ //nolint:staticcheck
429451 StatementHeader : in_toto.StatementHeader {
430452 Type : in_toto .StatementInTotoV01 ,
431453 PredicateType : PredicateSLSAProvenanceV1 ,
@@ -454,18 +476,25 @@ func TestSLSAProvenanceV1_PredicateBuildType(t *testing.T) {
454476
455477 for _ , tt := range tests {
456478 t .Run (tt .name , func (t * testing.T ) {
479+ //nolint:staticcheck
457480 slsa := slsaProvenanceV1 {
481+ //nolint:staticcheck
458482 statement : in_toto.ProvenanceStatementSLSA1 {
483+ //nolint:staticcheck
459484 StatementHeader : in_toto.StatementHeader {
460485 Type : in_toto .StatementInTotoV01 ,
461486 PredicateType : PredicateSLSAProvenanceV1 ,
462487 },
488+ //nolint:staticcheck
463489 Predicate : v1.ProvenancePredicate {
490+ //nolint:staticcheck
464491 BuildDefinition : v1.ProvenanceBuildDefinition {
465492 BuildType : tt .buildType ,
466493 ExternalParameters : map [string ]interface {}{},
467494 },
495+ //nolint:staticcheck
468496 RunDetails : v1.ProvenanceRunDetails {
497+ //nolint:staticcheck
469498 Builder : v1.Builder {
470499 ID : "https://my.builder" ,
471500 },
0 commit comments