rules

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code string

type Result

type Result struct {
	Slug      string
	Help      string
	Code      Code
	StmtStart int32
	StmtEnd   int32
}

type Rule

type Rule struct {
	Code              Code
	Slug              string
	Help              string
	Fn                func(*pgquery.ParseResult, Code, string, string) ([]Result, error)
	Category          string
	DisabledByDefault bool
}

func AllRules

func AllRules() []Rule

type StmtDecl

type StmtDecl[T any] struct {
	Stmt  T
	Start int32
	End   int32
}

func FilterStatements

func FilterStatements[T any](rawStmts []*pgquery.RawStmt) []StmtDecl[T]

Jump to

Keyboard shortcuts

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