linter

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package linter implements sqio's SQL safety and style checks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Issue

type Issue struct {
	Line     int    `json:"line"`
	Rule     string `json:"rule"`
	Severity string `json:"severity"`
	Message  string `json:"message"`
}

Issue describes one lint finding with enough metadata for text and structured output formats.

type Options

type Options struct {
	Dialect string
	Level   string
	Enable  []string
	Disable []string
}

Options controls which lint rules are enabled, disabled, or filtered by severity.

type Result

type Result struct {
	Issues []Issue `json:"issues"`
}

Result is the complete lint response for one SQL input.

func Lint

func Lint(sql string, opts ...Options) Result

Lint analyzes SQL text and returns style, safety, and performance findings. It ignores comments and string literals for checks that should only consider executable SQL.

Jump to

Keyboard shortcuts

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