rules

package
v1.17.0-beta35 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

README

Custom Linting with Ruleguard

This folder contains custom rules we define ourselves for this particular project. If you find an anti-pattern that you want to prevent, you should first check to see if there's a linter in the list here to make sure there is not a check that already exists. However, if you can't find such a check, it is fairly easy to build a custom check using the ruleguard DSL.

Writing Rules

Rather than getting into details of how to write rules, here are some links to the most useful documentation:

Directory Layout

This directory must be flat. Subdirectories of this directory will not be checked for Golang files. This is controlled by the /linters-settings/gocritic/settings/ruleguard/rules setting in .golangci.yaml. Often, rules are all piled into a single file, but I've tried to break them up a little bit to keep a single file of rules from being difficult to manage. Break them as best you see fit.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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