Skip to content

Commit

Permalink
chore: naming, gosimports
Browse files Browse the repository at this point in the history
Signed-off-by: Keith Zantow <[email protected]>
  • Loading branch information
kzantow committed May 20, 2024
1 parent 457a9af commit 7509724
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name: build
on: [push, pull_request]
jobs:
tests:
tests: # this is the only required check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -17,7 +17,7 @@ jobs:
with:
path-to-profile: profile.cov

tests-latest:
test-platforms:
strategy:
matrix:
go-version: ['stable']
Expand Down
8 changes: 4 additions & 4 deletions builder/build_package.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ import (
func BuildPackageSection(packageName string, dirRoot string, pathsIgnore []string) (*spdx.Package, error) {
// build the file section first, so we'll have it available
// for calculating the package verification code
relativePaths, err := utils.GetAllFilePaths(dirRoot, pathsIgnore)
shortPaths, err := utils.GetAllFilePaths(dirRoot, pathsIgnore)

if err != nil {
return nil, err
}

files := []*spdx.File{}
fileNumber := 0
for _, filePath := range relativePaths {
// SPDX spec says file names should generally start with ./
for _, shortPath := range shortPaths {
// SPDX spec says file names should generally start with ./ and the shortPath already starts with /
// see: https://spdx.github.io/spdx-spec/v2.3/file-information/#81-file-name-field
relativePath := "." + filePath
relativePath := "." + shortPath
newFile, err := BuildFileSection(relativePath, dirRoot, fileNumber)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion spdx/v2/v2_1/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package v2_1

import (
"github.com/anchore/go-struct-converter"
converter "github.com/anchore/go-struct-converter"

"github.com/spdx/tools-golang/spdx/v2/common"
)
Expand Down
6 changes: 4 additions & 2 deletions spdx/v2/v2_2/json/empty_values_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ package json

import (
"encoding/json"
"testing"

"github.com/stretchr/testify/require"

"github.com/spdx/tools-golang/spdx/v2/common"
spdx "github.com/spdx/tools-golang/spdx/v2/v2_2"
"github.com/stretchr/testify/require"
"testing"
)

func Test_omitsAppropriateProperties(t *testing.T) {
Expand Down

0 comments on commit 7509724

Please sign in to comment.