Loading tools/compliance/cmd/sbom/sbom.go +4 −4 Original line number Diff line number Diff line Loading @@ -343,9 +343,9 @@ func sbomGenerator(ctx *context, files ...string) ([]string, error) { if isMainPackage { mainPackage = getDocumentName(ctx, tn, pm) fmt.Fprintf(ctx.stdout, "SPDXVersion: SPDX-2.2\n") fmt.Fprintf(ctx.stdout, "DataLicense: CC-1.0\n") fmt.Fprintf(ctx.stdout, "DataLicense: CC0-1.0\n") fmt.Fprintf(ctx.stdout, "DocumentName: %s\n", mainPackage) fmt.Fprintf(ctx.stdout, "SPDXID: SPDXRef-DOCUMENT-%s\n", mainPackage) fmt.Fprintf(ctx.stdout, "SPDXID: SPDXRef-DOCUMENT\n") fmt.Fprintf(ctx.stdout, "DocumentNamespace: Android\n") fmt.Fprintf(ctx.stdout, "Creator: Organization: Google LLC\n") fmt.Fprintf(ctx.stdout, "Created: %s\n", ctx.creationTime().Format("2006-01-02T15:04:05Z")) Loading @@ -363,8 +363,8 @@ func sbomGenerator(ctx *context, files ...string) ([]string, error) { }() if len(path) == 0 { relationships = append(relationships, fmt.Sprintf("Relationship: SPDXRef-DOCUMENT-%s DESCRIBES SPDXRef-Package-%s", mainPackage, getPackageName(ctx, tn))) fmt.Sprintf("Relationship: SPDXRef-DOCUMENT DESCRIBES SPDXRef-Package-%s", getPackageName(ctx, tn))) } else { // Check parent and identify annotation parent := path[len(path)-1] Loading tools/compliance/cmd/sbom/sbom_test.go +54 −60 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
tools/compliance/cmd/sbom/sbom.go +4 −4 Original line number Diff line number Diff line Loading @@ -343,9 +343,9 @@ func sbomGenerator(ctx *context, files ...string) ([]string, error) { if isMainPackage { mainPackage = getDocumentName(ctx, tn, pm) fmt.Fprintf(ctx.stdout, "SPDXVersion: SPDX-2.2\n") fmt.Fprintf(ctx.stdout, "DataLicense: CC-1.0\n") fmt.Fprintf(ctx.stdout, "DataLicense: CC0-1.0\n") fmt.Fprintf(ctx.stdout, "DocumentName: %s\n", mainPackage) fmt.Fprintf(ctx.stdout, "SPDXID: SPDXRef-DOCUMENT-%s\n", mainPackage) fmt.Fprintf(ctx.stdout, "SPDXID: SPDXRef-DOCUMENT\n") fmt.Fprintf(ctx.stdout, "DocumentNamespace: Android\n") fmt.Fprintf(ctx.stdout, "Creator: Organization: Google LLC\n") fmt.Fprintf(ctx.stdout, "Created: %s\n", ctx.creationTime().Format("2006-01-02T15:04:05Z")) Loading @@ -363,8 +363,8 @@ func sbomGenerator(ctx *context, files ...string) ([]string, error) { }() if len(path) == 0 { relationships = append(relationships, fmt.Sprintf("Relationship: SPDXRef-DOCUMENT-%s DESCRIBES SPDXRef-Package-%s", mainPackage, getPackageName(ctx, tn))) fmt.Sprintf("Relationship: SPDXRef-DOCUMENT DESCRIBES SPDXRef-Package-%s", getPackageName(ctx, tn))) } else { // Check parent and identify annotation parent := path[len(path)-1] Loading
tools/compliance/cmd/sbom/sbom_test.go +54 −60 File changed.Preview size limit exceeded, changes collapsed. Show changes