Skip to content
Merged
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
7 changes: 3 additions & 4 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
go-version-file: "go.mod"
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v9
with:
version: v1.64
only-new-issues: true
version: v2.7.1
51 changes: 51 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
version: "2"

formatters:
enable:
- gofumpt
- gci

linters:
default: none
enable:
- copyloopvar
- dupword
- errcheck
- govet
- ineffassign
- intrange
- misspell
- modernize
- staticcheck
- unused
- usetesting
settings:
staticcheck:
checks:
- all
usetesting:
context-background: true
context-todo: true
os-chdir: true
os-mkdir-temp: true
os-setenv: true
os-temp-dir: true
os-create-temp: true
exclusions:
generated: lax
presets:
- comments
- std-error-handling

issues:
max-issues-per-linter: 0
max-same-issues: 0

run:
timeout: 3m
modules-download-mode: readonly

output:
sort-order:
- file
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ This tool is particularly helpful for new contributors or those returning to the

The pre-commit hook is configured to run the following check:

1. **Code Formatting**: Ensures all files are properly formatted using `go fmt`. Any changes made by `go fmt` will be automatically staged.
1. **Code Formatting**: Ensures all files are properly formatted using `golangci-lint fmt`. Any changes made by `golangci-lint fmt` will be automatically staged.

### Pre-Push Hook

Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,28 +85,28 @@ generate: generate-api generate-docs generate-schema

.PHONY: fmt
fmt:
@echo "Running go fmt..."
@go fmt ./...
@echo "Running golangci-lint fmt..."
@golangci-lint fmt
@echo "Code formatted successfully!"

.PHONY: lint
lint:
@echo "Running golangci-lint..."
@if ! command -v golangci-lint &> /dev/null; then \
echo "Installing golangci-lint..."; \
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.0; \
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.7.1; \
fi
@golangci-lint run ./...
@golangci-lint run
@echo "Linting completed successfully!"

.PHONY: lint-fix
lint-fix:
@echo "Running golangci-lint with auto-fix..."
@if ! command -v golangci-lint &> /dev/null; then \
echo "Installing golangci-lint..."; \
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.0; \
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.7.1; \
fi
@golangci-lint run --fix ./...
@golangci-lint run --fix
@echo "Linting with auto-fix completed successfully!"

.PHONY: verify-generate
Expand All @@ -121,4 +121,4 @@ verify-generate: generate

.PHONY: ci
ci: lint test verify-generate
@echo "All CI checks passed successfully!"
@echo "All CI checks passed successfully!"
2 changes: 1 addition & 1 deletion docs/generate-commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func processCommandFile(cmd *cobra.Command, filePath string) {

// Only write the file if content was modified
if modifiedContent != string(content) {
err = os.WriteFile(filePath, []byte(modifiedContent), 0644)
err = os.WriteFile(filePath, []byte(modifiedContent), 0o644)
if err != nil {
fmt.Fprintf(os.Stderr, "error writing file %s: %v\n", filePath, err)
}
Expand Down
60 changes: 30 additions & 30 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,39 @@ go 1.24.0
toolchain go1.24.1

require (
dagger.io/dagger v0.19.0
dagger.io/dagger v0.19.8
github.com/google/go-cmp v0.7.0
github.com/h2non/gock v1.2.0
github.com/iancoleman/strcase v0.3.0
github.com/invopop/jsonschema v0.13.0
github.com/kriscoleman/GoRetry v0.0.1
github.com/oapi-codegen/runtime v1.1.2
github.com/pterm/pterm v0.12.81
github.com/spf13/afero v1.14.0
github.com/spf13/cobra v1.9.1
github.com/spf13/pflag v1.0.6
github.com/spf13/viper v1.20.1
github.com/pterm/pterm v0.12.82
github.com/spf13/afero v1.15.0
github.com/spf13/cobra v1.10.2
github.com/spf13/pflag v1.0.10
github.com/spf13/viper v1.21.0
github.com/stretchr/testify v1.11.1
github.com/xeipuuv/gojsonschema v1.2.0
golang.org/x/term v0.35.0
golang.org/x/text v0.29.0
golang.org/x/tools v0.37.0
golang.org/x/term v0.37.0
golang.org/x/text v0.31.0
golang.org/x/tools v0.39.0
gopkg.in/yaml.v3 v3.0.1
)

require (
atomicgo.dev/cursor v0.2.0 // indirect
atomicgo.dev/keyboard v0.2.9 // indirect
atomicgo.dev/schedule v0.1.0 // indirect
github.com/99designs/gqlgen v0.17.80 // indirect
github.com/99designs/gqlgen v0.17.84 // indirect
github.com/Khan/genqlient v0.8.1 // indirect
github.com/adrg/xdg v0.5.3 // indirect
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/clipperhouse/stringish v0.1.1 // indirect
github.com/clipperhouse/uax29/v2 v2.3.0 // indirect
github.com/containerd/console v1.0.5 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
Expand All @@ -44,29 +46,27 @@ require (
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gookit/color v1.5.4 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect
github.com/gookit/color v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 // indirect
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/lithammer/fuzzysearch v1.1.8 // indirect
github.com/mailru/easyjson v0.9.0 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mailru/easyjson v0.9.1 // indirect
github.com/mattn/go-runewidth v0.0.19 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sagikazarmark/locafero v0.9.0 // indirect
github.com/sagikazarmark/locafero v0.12.0 // indirect
github.com/sosodev/duration v1.3.1 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/cast v1.8.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/vektah/gqlparser/v2 v2.5.30 // indirect
github.com/vektah/gqlparser/v2 v2.5.31 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/otel v1.38.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.14.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.14.0 // indirect
Expand All @@ -81,15 +81,15 @@ require (
go.opentelemetry.io/otel/sdk/log v0.14.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.38.0 // indirect
go.opentelemetry.io/otel/trace v1.38.0 // indirect
go.opentelemetry.io/proto/otlp v1.8.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/exp v0.0.0-20250530174510-65e920069ea6 // indirect
golang.org/x/mod v0.28.0 // indirect
golang.org/x/net v0.44.0 // indirect
golang.org/x/sync v0.17.0 // indirect
golang.org/x/sys v0.36.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 // indirect
google.golang.org/grpc v1.75.1 // indirect
google.golang.org/protobuf v1.36.9 // indirect
golang.org/x/mod v0.30.0 // indirect
golang.org/x/net v0.47.0 // indirect
golang.org/x/sync v0.18.0 // indirect
golang.org/x/sys v0.38.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect
google.golang.org/grpc v1.77.0 // indirect
google.golang.org/protobuf v1.36.10 // indirect
)
Loading