From a32da6ef1b3debd1330858a87f053fcf8f2de8bb Mon Sep 17 00:00:00 2001 From: Kynan Ware <47394200+BagToad@users.noreply.github.com> Date: Wed, 4 Mar 2026 15:18:56 -0700 Subject: [PATCH] Enable godoclint linter with require-doc rule Add godoclint to the enabled linters list with only the require-doc rule enabled (default set to none). This enforces that all exported symbols have godoc comments. Test files are excluded from this check. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .golangci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 932a4b438..2cda3b9c0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -14,6 +14,7 @@ linters: - gocheckcompilerdirectives # validates go compiler directive comments (//go:) - gochecksumtype # checks exhaustiveness on Go "sum types" - gocritic # provides diagnostics that check for bugs, performance and style issues + - godoclint # checks Go documentation practice - gomoddirectives # manages the use of 'replace', 'retract', and 'excludes' directives in go.mod - goprintffuncname # checks that printf-like functions are named with f at the end - govet # reports suspicious constructs, such as Printf calls whose arguments do not align with the format string @@ -35,6 +36,7 @@ linters: - path: _test\.go$ linters: - bodyclose + - godoclint - gosec settings: gocritic: @@ -42,6 +44,10 @@ linters: - appendAssign disabled-tags: - style + godoclint: + default: none + enable: + - require-doc gosec: excludes: - G110