Lintroller houses all of the custom linters that Outreach uses for Go projects.
Please read the CONTRIBUTING.md document for guidelines on developing and contributing changes.
lintroller is a collection of linting rules for go projects, implemented as
Analyzers
run through
unitchecker.
This makes lintroller compatible with go vet
, the recommended way to run lintroller.
copyright
- Checks that files start with a header that matches a regular expression.doculint
- Checks that packages and various top-level items in the package have well-formed comments.header
- Checks that source code files have structured headers.todo
- Checks that TODO comments:- Start the comment line.
- Have one or more of a github username in parenthesis (
(username)
) or a Jira ticket ([ticket-123]
), in that order, immediately after the TODO text. - Have a colon and space after the username or ticket.
why
- Checks thatnolint
comments:- Have specific rule(s) they are ignoring (are followed by a colon then one or more comma-separated rules to ignore).
- Are followed by
// Why: <explanation>
on the same line.