codes

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package codes names the rules a diagnostic of ant check can report (spec/check.md section 3). A code names a rule, not a message: several messages share one, and a message may be reworded without its code changing.

Index

Constants

This section is empty.

Variables

All is every code, in the order of the catalog.

Functions

func Known

func Known(c Code) bool

Known reports whether c is a code of the catalog.

Types

type Code

type Code string

Code is the name of a rule, as ant check prints it in brackets and -json writes it.

const (
	Syntax           Code = "syntax"
	MissingModule    Code = "missing-module"
	Import           Code = "import"
	Undefined        Code = "undefined"
	NotExported      Code = "not-exported"
	Redeclared       Code = "redeclared"
	DeclarationOrder Code = "declaration-order"
	Misplaced        Code = "misplaced"
	WrongKind        Code = "wrong-kind"
	TypeMismatch     Code = "type-mismatch"
	NoMember         Code = "no-member"
	NeedsNarrowing   Code = "needs-narrowing"
	NotNullable      Code = "not-nullable"
	Operands         Code = "operands"
	Arguments        Code = "arguments"
	NeedsAnnotation  Code = "needs-annotation"
	NoCommonType     Code = "no-common-type"
	Bound            Code = "bound"
	InvalidUnion     Code = "invalid-union"
	TypeDeclaration  Code = "type-declaration"
	Spread           Code = "spread"
	MissingField     Code = "missing-field"
	MissingElse      Code = "missing-else"
	Try              Code = "try"
	Assign           Code = "assign"
	Lambda           Code = "lambda"
	IsTest           Code = "is-test"
	UselessTest      Code = "useless-test"
	DurationEquality Code = "duration-equality"
	Markup           Code = "markup"
	Conversion       Code = "conversion"
	VoidValue        Code = "void-value"
	Reflect          Code = "reflect"
	Internal         Code = "internal"

	// The warnings (spec/check.md section 4).
	UnusedResult       Code = "unused-result"
	UnusedImport       Code = "unused-import"
	UnusedVariable     Code = "unused-variable"
	NamedInterpolation Code = "named-interpolation"
)

Jump to

Keyboard shortcuts

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