Add task for formatting source code

This commit is contained in:
9seconds
2026-02-11 09:45:40 +01:00
parent 75c317f35e
commit b72af2b953
+6 -1
View File
@@ -1,6 +1,5 @@
[tools]
go = "latest"
gofumpt = "latest"
[tasks.build]
description = "Build binary"
@@ -38,3 +37,9 @@ run = [
description = "Run doc server"
tools."go:golang.org/x/pkgsite/cmd/pkgsite" = "latest"
run = "pkgsite -http 0.0.0.0:10000"
[tasks.fmt]
description = "Reformat source code"
tools.gofumpt = "latest"
sources = ["**/*.go"]
run = "gofumpt -w --extra ."