Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 1.99 KB

README.md

File metadata and controls

39 lines (29 loc) · 1.99 KB

lintroller

go.dev reference Generated via Bootstrap Coverage Status

Lintroller houses all of the custom linters that Outreach uses for Go projects.

Contributing

Please read the CONTRIBUTING.md document for guidelines on developing and contributing changes.

High-level Overview

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.

Implemented rules

  • 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 that nolint 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.