lintroller

package module
v1.18.5 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

README

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.

Documentation

Overview

Package lintroller should be ignored, this exists because this project was bootstrapped as a library.

Directories

Path Synopsis
cmd
internal
common
Package common contains constants, functions, and types that are used in more than one linter.
Package common contains constants, functions, and types that are used in more than one linter.
config
Package config is used for defining the configuration necessary to run the linters in an automated fashion.
Package config is used for defining the configuration necessary to run the linters in an automated fashion.
copyright
Package copyright contains the necessary logic for the copyright linter.
Package copyright contains the necessary logic for the copyright linter.
doculint
Package doculint contains the necessary logic for the doculint linter.
Package doculint contains the necessary logic for the doculint linter.
header
Package header defines the logic for the header linter.
Package header defines the logic for the header linter.
reporter
Package reporter implements an interface that captures the analysis.Pass.Reportf function within it so that it can be wrapped.
Package reporter implements an interface that captures the analysis.Pass.Reportf function within it so that it can be wrapped.
todo
Package todo contains the necessary logic for the todo linter.
Package todo contains the necessary logic for the todo linter.
why
Package why contains the necessary logic for the why linter.
Package why contains the necessary logic for the why linter.

Jump to

Keyboard shortcuts

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