Documentation
¶
Overview ¶
commentcensus lists the multi-line comment blocks in the tree and measures what share of each package is comment.
It is a work list and a measurement, nothing else: it never edits a file and never says what a block should become. That judgment is the pass's, one block at a time, and a tool that guessed would be exactly the mechanical stripping that was considered and rejected (#1620).
What it will not put on the list, because those blocks are not prose: build and generate directives, lint pragmas, the cgo preamble that must sit against import "C", and a licence header. Listing them would send a reader to look at something they must not touch.
Usage:
go run ./hack/commentcensus # per-package ratios, worst first go run ./hack/commentcensus -blocks # the work list, every block of 3+ go run ./hack/commentcensus -json # the same numbers for a gate check go run ./hack/commentcensus -pkg internal/storage/... go run ./hack/commentcensus -dashes # tracked lines holding an em dash
Click to show internal directories.
Click to hide internal directories.