godoc-lint is a linter for Go documentation comments.
It is aimed especially at reusable modules, SDKs, API clients and libraries where consistent documentation affects both IDE assistance and the rendered documentation on pkg.go.dev. The tool applies a configurable set of rules derived from established Go documentation conventions while keeping a practical default configuration for projects that want useful checks without extensive setup. This makes it particularly useful for codebases exposing public APIs where documentation consistency forms part of the developer experience.
This is free and open source software.
Key Features
- Checks that package documentation begins with the expected
Package nameform. - Can require packages to contain documentation and enforce a single package documentation comment.
- Checks that documentation for declarations begins with the corresponding symbol name.
- Can require documentation for exported symbols and, optionally, unexported symbols.
- Validates the conventional formatting of deprecation notices.
- Can limit documentation line length while ignoring appropriate preformatted sections and link definitions.
- Detects documentation link definitions that are never referenced.
- Can suggest standard-library identifiers that should use Go documentation links.
- Allows individual rules to be enabled or disabled through configuration.
- Supports path inclusion and exclusion patterns for controlling which source files are analysed.
- Provides inline directives for suppressing selected rules around individual declarations or across an entire file.
- Can skip test files or include them depending on the configured policy.
- Works as a standalone command and is also available through Golangci-lint.
- Uses sensible defaults when no project configuration file is present.
Website: github.com/godoc-lint/godoc-lint
Support:
Developer: godoc-lint
License: MIT License
godoc-lint is written in Go. Learn Go with our recommended free books and free tutorials.
Related Software
| Go Linters | |
|---|---|
| revive | Designed as a drop-in replacement for golint |
| golangci-lint | Fast Go linters runner |
| gosec | Security scanner for Go projects |
| Staticcheck | Advanced Go linter |
| go-critic | Opinionated Go source code linter |
| Vet | Examines Go source code and reports suspicious constructs |
| gofumpt | Stricter gofmt |
| gofmt | Formats Go programs |
| goconst | Find repeated Go literals that could be replaced with constants |
| go-ruleguard | Analysis-based Go linter that runs dynamically loaded rules |
| sloglint | Enforce consistent structured logging conventions in Go |
| forbidigo | Go linter for forbidding identifiers |
| godot | Keep source code comments consistent |
| Godoc-Lint | Enforce consistent documentation comments in Go code |
| exhaustive | Check Go switch statements for missing enum cases |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.