Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # ratchet:actions/checkout@v3
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: '1.20'
go-version: '1.24'
- name: Verify dependencies
run: go mod verify
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
token: ${{ secrets.DOCS_TOKEN }}
- uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # ratchet:actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.24
- name: build docs
run: make docs
- name: update docs
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/code_analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # ratchet:actions/checkout@v3
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.24
- name: Lint
uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5 # v3.4
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # ratchet:golangci/golangci-lint-action@v8.0.0
with:
version: v1.50.0
version: v2.1.6
args: --timeout=3m
- uses: dominikh/staticcheck-action@ba605356b4b29a60e87ab9404b712f3461e566dc # ratchet:dominikh/staticcheck-action@v1.3.0
with:
install-go: false
version: "2023.1.3"
version: "2025.1.1"
2 changes: 1 addition & 1 deletion .github/workflows/e2e_testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # ratchet:actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.24
- name: Build
run: |
make build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
fetch-depth: 0
- uses: 'actions/setup-go@fcdc43634adb5f7ae75a9d7a9b9361790f7293e2'
with:
go-version: '1.19'
go-version: '1.24'
- uses: 'docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b'
with:
registry: 'ghcr.io'
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ runs:
if: ${{ inputs.compile_legitify == 'true' }}
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.24
- id: checkout_legitify
if: ${{ inputs.compile_legitify == 'true' }}
uses: 'actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b'
Expand Down
9 changes: 5 additions & 4 deletions cmd/common_providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ import (
"bufio"
"context"
"fmt"
"log"
"os"
"strings"

"github.com/Legit-Labs/legitify/internal/common/namespace"
"github.com/Legit-Labs/legitify/internal/common/scm_type"
"github.com/Legit-Labs/legitify/internal/context_utils"
"github.com/Legit-Labs/legitify/internal/gpt"
"github.com/Legit-Labs/legitify/internal/opa"
"github.com/Legit-Labs/legitify/internal/opa/opa_engine"
"github.com/Legit-Labs/legitify/internal/outputer"
"log"
"os"
"strings"
)

func provideGenericClient(args *args) (Client, error) {
Expand Down Expand Up @@ -51,7 +52,7 @@ func getIgnoredPolicies(args *args) []string {
log.Println(err)
return result
}
defer readFile.Close()
defer readFile.Close() //nolint:errcheck
fileScanner := bufio.NewScanner(readFile)
fileScanner.Split(bufio.ScanLines)

Expand Down
6 changes: 5 additions & 1 deletion cmd/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ func executeConvertCommand(cmd *cobra.Command, _args []string) error {
return fmt.Errorf("failed to format: %v", err)
}

os.Stdout.Write(output)
_, err = os.Stdout.Write(output)
if err != nil {
return fmt.Errorf("failed to write output: %v", err)
}

return nil
}
18 changes: 9 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/Legit-Labs/legitify

go 1.19
go 1.23.0

require (
github.com/fatih/color v1.16.0
Expand All @@ -25,7 +25,7 @@ require (
github.com/thedevsaddam/gojsonq/v2 v2.5.2
github.com/vbauerster/mpb/v8 v8.4.0
github.com/xanzy/go-gitlab v0.83.0
golang.org/x/net v0.23.0
golang.org/x/net v0.41.0
golang.org/x/oauth2 v0.8.0
gopkg.in/yaml.v3 v3.0.1
)
Expand Down Expand Up @@ -125,15 +125,15 @@ require (
github.com/yashtewari/glob-intersection v0.1.0 // indirect
go.opencensus.io v0.24.0 // indirect
gocloud.dev v0.29.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/crypto v0.39.0 // indirect
golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/mod v0.25.0 // indirect
golang.org/x/sync v0.15.0 // indirect
golang.org/x/sys v0.33.0 // indirect
golang.org/x/term v0.32.0 // indirect
golang.org/x/text v0.26.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.13.0 // indirect
golang.org/x/tools v0.34.0 // indirect
golang.org/x/vuln v0.0.0-20230118164824-4ec8867cc0e6 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.114.0 // indirect
Expand Down
Loading