style

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 AliasStyle

type AliasStyle string

AliasStyle represents the preferred alias style

const (
	// AliasExplicit requires explicit AS keyword: table AS t
	AliasExplicit AliasStyle = "explicit"
	// AliasImplicit allows implicit aliases: table t
	AliasImplicit AliasStyle = "implicit"
)

type AliasingConsistencyRule

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

AliasingConsistencyRule checks for consistent aliasing patterns

func NewAliasingConsistencyRule

func NewAliasingConsistencyRule(preferExplicitAS bool) *AliasingConsistencyRule

NewAliasingConsistencyRule creates a new L009 rule instance

func (*AliasingConsistencyRule) Check

Check performs the aliasing consistency check

func (*AliasingConsistencyRule) Fix

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

Fix is not supported for this rule

type ColumnAlignmentRule

type ColumnAlignmentRule struct {
	linter.BaseRule
}

ColumnAlignmentRule checks for proper column alignment in SELECT statements

func NewColumnAlignmentRule

func NewColumnAlignmentRule() *ColumnAlignmentRule

NewColumnAlignmentRule creates a new L006 rule instance

func (*ColumnAlignmentRule) Check

Check performs the column alignment check

func (*ColumnAlignmentRule) Fix

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

Fix is not supported for this rule

type CommaPlacementRule

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

CommaPlacementRule checks for consistent comma placement

func NewCommaPlacementRule

func NewCommaPlacementRule(preferredStyle CommaStyle) *CommaPlacementRule

NewCommaPlacementRule creates a new L008 rule instance

func (*CommaPlacementRule) Check

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

Check performs the comma placement check

func (*CommaPlacementRule) Fix

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

Fix is not supported for this rule (requires careful restructuring)

type CommaStyle

type CommaStyle string

CommaStyle represents the preferred comma placement style

const (
	// CommaTrailing means commas at end of lines: col1,
	CommaTrailing CommaStyle = "trailing"
	// CommaLeading means commas at start of lines: , col1
	CommaLeading CommaStyle = "leading"
)

Jump to

Keyboard shortcuts

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