Skip to content

Commit

Permalink
Merge pull request #1 from manifest-cyber/fix-review-issues
Browse files Browse the repository at this point in the history
chore: fix lint and upgrade deps
  • Loading branch information
devon-manifest authored Oct 1, 2024
2 parents 8017a80 + e8d9e96 commit 221896f
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind",
"features": {
"ghcr.io/devcontainers/features/go:1": {
"version": "1.21.5"
"version": "1.23.1"
},
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: '1.22'
go-version-file: ./go.mod
check-latest: true

- name: govulncheck
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:

- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: '1.22'
go-version-file: ./go.mod
check-latest: true

- name: setup-ruleguard
Expand All @@ -76,7 +76,7 @@ jobs:

- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: '1.22'
go-version-file: ./go.mod
check-latest: true

- uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ jobs:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: '1.22'
check-latest: true
go-version-file: ./go.mod
cache: true

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
args: --timeout=5m
version: v1.59
version: v1.61.0
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: '1.22'
go-version-file: ./go.mod
check-latest: true

- name: Login to GitHub Container Registry
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
- id: go-test-mod

- repo: https://github.com/golangci/golangci-lint
rev: v1.59.1
rev: v1.61.0
hooks:
- id: golangci-lint
args: ["--timeout", "10m", "--fix"]
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/protobom/sbom-convert/pkg/format"
)

var outputDirPermissions = 0o755
const outputDirPermissions uint32 = 0o755

func ConvertCommand() *cobra.Command {
co := &options.ConvertOptions{}
Expand Down
2 changes: 2 additions & 0 deletions cmd/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ func validateRootOptions(_ *options.RootOptions) error {
}

func setupLogger(ro *options.RootOptions) error {
//nolint:gosec
// verbose is always within the range of int8
level := zapcore.Level(int(zap.WarnLevel) - ro.Verbose)
log, err := log.NewLogger(
log.WithLevel(level),
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/protobom/sbom-convert

go 1.22.5
go 1.23.1

require (
github.com/google/go-cmp v0.6.0
Expand Down

0 comments on commit 221896f

Please sign in to comment.