idlint

command
v0.13.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2026 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

idlint walks pkg/webapi and pkg/webauth, extracts every @ID value appearing in a top-level function's doc comment (via the Go AST — including `/* */` block comments which a plain grep would miss), and asserts that each value is declared as a string constant in pkg/webapi/docs/op_ids.go.

The stale grep-based `make docs-lint` target this tool replaces had three gaps: it ignored block comments entirely, it matched mid-line `@ID` references (anywhere, not just in annotation doc blocks), and it had no understanding of Go syntax so stray occurrences in unrelated strings or comments would trigger false positives.

Usage:

go run ./pkg/webapi/docs/cmd/idlint

Exits non-zero with a diagnostic listing every @ID value that isn't a registered constant in op_ids.go.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL