example

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package example provides example linters to demonstrate the linter framework. These linters are for demonstration purposes and are not registered by default.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DuplicateColumnLinter

type DuplicateColumnLinter struct{}

DuplicateColumnLinter checks for duplicate column names in CREATE TABLE statements.

func (*DuplicateColumnLinter) Description

func (l *DuplicateColumnLinter) Description() string

func (*DuplicateColumnLinter) Lint

func (l *DuplicateColumnLinter) Lint(createTables []*statement.CreateTable, statements []*statement.AbstractStatement) []lint.Violation

func (*DuplicateColumnLinter) Name

func (l *DuplicateColumnLinter) Name() string

func (*DuplicateColumnLinter) String

func (l *DuplicateColumnLinter) String() string

type TableNameLengthLinter

type TableNameLengthLinter struct {
	// contains filtered or unexported fields
}

TableNameLengthLinter checks that table names are not too long. MySQL has a limit of 64 characters for table names.

func NewTableNameLengthLinter

func NewTableNameLengthLinter() *TableNameLengthLinter

NewTableNameLengthLinter creates a new table name length linter with default configuration.

func (*TableNameLengthLinter) Configure

func (l *TableNameLengthLinter) Configure(config map[string]string) error

func (*TableNameLengthLinter) DefaultConfig

func (l *TableNameLengthLinter) DefaultConfig() map[string]string

func (*TableNameLengthLinter) Description

func (l *TableNameLengthLinter) Description() string

func (*TableNameLengthLinter) Lint

func (l *TableNameLengthLinter) Lint(createTables []*statement.CreateTable, statements []*statement.AbstractStatement) []lint.Violation

func (*TableNameLengthLinter) Name

func (l *TableNameLengthLinter) Name() string

func (*TableNameLengthLinter) String

func (l *TableNameLengthLinter) String() string

Jump to

Keyboard shortcuts

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