diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-05 15:06:34 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-05 20:27:42 +0200 |
| commit | 016b10e33161ec3274cf4b4d34eb939a290a9243 (patch) | |
| tree | 4c2a3f3240d47528d8f0111e3804eb430379a436 | |
| parent | d2b64a395c117c73191560629062b29127bbb940 (diff) | |
Use mise for project tasks
| -rw-r--r-- | .mise.toml | 40 | ||||
| -rw-r--r-- | Taskfile.yml | 38 |
2 files changed, 40 insertions, 38 deletions
diff --git a/.mise.toml b/.mise.toml new file mode 100644 index 0000000..168c087 --- /dev/null +++ b/.mise.toml @@ -0,0 +1,40 @@ +[tasks.templates] +description = "Generate templ files" +run = "go tool templ generate" + +[tasks.gettext] +description = "Generate gettext translation files" +run = "go run github.com/martinlehoux/kagamigo/ki18n/cmd/gettext" + +[tasks.check] +description = "Run formatting, static, security, lint, race, and module checks" +run = [ + "gofmt -d -e -s .", + "go vet ./...", + "go tool staticcheck ./...", + "go tool gosec -quiet ./...", + "go tool golangci-lint run", + "go tool govulncheck", + "go test -race ./...", + "go tool revive", + "go mod tidy", + "mise run gettext", +] + +[tasks.tools] +description = "Install development tools" +run = [ + "go get -tool github.com/a-h/templ/cmd/templ", + "go get -tool github.com/amacneil/dbmate", + "go get -tool github.com/golangci/golangci-lint/v2/cmd/golangci-lint", + "go get -tool github.com/securego/gosec/v2/cmd/gosec", + "go get -tool golang.org/x/vuln/cmd/govulncheck", + "go get -tool honnef.co/go/tools/cmd/staticcheck", +] + +[tasks.test] +description = "Run tests and open the coverage report" +run = [ + "go test -v -cover -coverprofile=coverage.out ./...", + "go tool cover -html=coverage.out", +] diff --git a/Taskfile.yml b/Taskfile.yml deleted file mode 100644 index 7033429..0000000 --- a/Taskfile.yml +++ /dev/null @@ -1,38 +0,0 @@ -# https://taskfile.dev -version: '3' - -tasks: - templates: - cmds: - - go tool templ generate - - gettext: - cmds: - - go run github.com/martinlehoux/kagamigo/ki18n/cmd/gettext - - check: - cmds: - - gofmt -d -e -s . - - go vet ./... - - go tool staticcheck ./... - - go tool gosec -quiet ./... - - go tool golangci-lint run - - go tool govulncheck - - go test -race ./... - - go tool revive - - go mod tidy - - task gettext - - tools: - cmds: - - go get -tool github.com/a-h/templ/cmd/templ - - go get -tool github.com/amacneil/dbmate - - go get -tool github.com/golangci/golangci-lint/v2/cmd/golangci-lint - - go get -tool github.com/securego/gosec/v2/cmd/gosec - - go get -tool golang.org/x/vuln/cmd/govulncheck - - go get -tool honnef.co/go/tools/cmd/staticcheck - - test: - cmds: - - go test -v -cover -coverprofile=coverage.out ./... - - go tool cover -html=coverage.out
\ No newline at end of file |
