diff --git a/skills/amoliths-go-opinions/SKILL.md b/skills/amoliths-go-opinions/SKILL.md index 27e4fec96346529e2f8a0ce0e7b8fcab84bc2ecf..8d663eb1dcd4de90ac9934b6ce9eba6bd2b2315e 100644 --- a/skills/amoliths-go-opinions/SKILL.md +++ b/skills/amoliths-go-opinions/SKILL.md @@ -51,6 +51,43 @@ Default to: - Amolith's licensing convention when the project does not already say otherwise: CC0 for docs/examples/config/prompt text, MutuaL for meaningful code +Use this `.golangci.toml` shape unless the project already has a stronger local +configuration. Replace the module path placeholders with the module from +`go.mod`: + +```toml +version = "2" + +[linters] +enable = ["bodyclose", "errcheck", "errorlint", "exhaustive", "gocognit", "govet", "ineffassign", "modernize", "nilerr", "nilnil", "noctx", "revive", "staticcheck", "unused"] + +[linters.settings.gocognit] +min-complexity = 15 + +[[linters.settings.revive.rules]] +name = "file-length-limit" +arguments = [{ max = 1000, skip-comments = true, skip-blank-lines = true }] + +[[linters.settings.revive.rules]] +name = "max-control-nesting" +arguments = [5] + +[formatters] +enable = ["goimports", "gofumpt", "gci", "golines"] + +[formatters.settings.goimports] +local-prefixes = [""] + +[formatters.settings.gofumpt] +module-path = "" + +[formatters.settings.gci] +sections = ["standard", "default", "localmodule"] + +[formatters.settings.golines] +max-len = 120 +``` + Default away from: - Taskfiles and justfiles in new setup