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
1 change: 1 addition & 0 deletions .versions
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
GOLANGCI_LINT_VERSION=2.10.1
YAMLFMT_VERSION=0.21.0
10 changes: 10 additions & 0 deletions .yamlfmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
formatter:
type: basic
basic_formatter_config:
indent: 2
include_document_start: false
retain_line_breaks_single: true
exclude:
- cmd/**
- internal/**
- public/**
2 changes: 2 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ tasks:
desc: Format code and tidy modules
deps:
- tools:install-golangci-lint
- tools:install-yamlfmt
cmds:
- '{{.TOOLS_BIN_DIR}}/yamlfmt'
- '{{.TOOLS_BIN_DIR}}/golangci-lint fmt cmd/... internal/... public/...'
- go mod tidy

Expand Down
8 changes: 8 additions & 0 deletions taskfiles/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tasks:
deps:
- install-golangci-lint
- install-govulncheck
- install-yamlfmt

install-golangci-lint:
desc: Install golangci-lint
Expand All @@ -21,3 +22,10 @@ tasks:
- .versions
cmds:
- GOBIN={{.GOBIN}} go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v{{.GOLANGCI_LINT_VERSION}}

install-yamlfmt:
desc: Install yamlfmt
run: once
silent: true
cmds:
- GOBIN={{.GOBIN}} go install github.com/google/yamlfmt/cmd/yamlfmt@v{{.YAMLFMT_VERSION}}