internal

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package internal implements the molint rules.

Each rule has its own file. They share one pass's state, in checker.go: the directives, the files that are generated, and the methods that implement an interface. The questions they ask of types and of SSA values live in the packages below this one.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(pass *analysis.Pass, cfg Config) (any, error)

Run analyzes one package.

Types

type Config

type Config struct {
	// On reports whether a rule is on.
	On func(rule.Name) bool
}

Config is what the analyzer's flags resolve to.

Directories

Path Synopsis
Package directive reads the //molint: comments in a package.
Package directive reads the //molint: comments in a package.
Package flow follows a value back through one function, to tell whether it is a constant that a rule looks for: a nil pointer, a nil error, the constant true, or a zero mo.Result.
Package flow follows a value back through one function, to tell whether it is a constant that a rule looks for: a nil pointer, a nil error, the constant true, or a zero mo.Result.
Package nilcheck reads what the branches above a point say about a value being nil.
Package nilcheck reads what the branches above a point say about a value being nil.
Package rule names the rules of molint.
Package rule names the rules of molint.
Package typeutil holds the type questions every rule asks, and the way a diagnostic spells types and declarations.
Package typeutil holds the type questions every rule asks, and the way a diagnostic spells types and declarations.

Jump to

Keyboard shortcuts

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