keywords

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaseStyle

type CaseStyle string

CaseStyle represents the preferred keyword case style

const (
	// CaseUpper prefers uppercase keywords (SELECT, FROM, WHERE)
	CaseUpper CaseStyle = "upper"
	// CaseLower prefers lowercase keywords (select, from, where)
	CaseLower CaseStyle = "lower"
)

type KeywordCaseRule

type KeywordCaseRule struct {
	linter.BaseRule
	// contains filtered or unexported fields
}

KeywordCaseRule checks for consistent keyword case

func NewKeywordCaseRule

func NewKeywordCaseRule(preferredStyle CaseStyle) *KeywordCaseRule

NewKeywordCaseRule creates a new L007 rule instance

func (*KeywordCaseRule) Check

func (r *KeywordCaseRule) Check(ctx *linter.Context) ([]linter.Violation, error)

Check performs the keyword case consistency check

func (*KeywordCaseRule) Fix

func (r *KeywordCaseRule) Fix(content string, violations []linter.Violation) (string, error)

Fix converts all keywords to the preferred case

Jump to

Keyboard shortcuts

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