pkg

package
v0.0.0-...-4e84997 Latest Latest
Warning

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

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

Documentation

Overview

Package pkg implements a linter that checks if feature gates are sorted alphabetically.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAnalyzer

func NewAnalyzer() *analysis.Analyzer

NewAnalyzer returns a new sorted analyzer.

func NewAnalyzerWithConfig

func NewAnalyzerWithConfig(config Config) *analysis.Analyzer

NewAnalyzerWithConfig returns a new sorted analyzer with the given configuration.

Types

type Config

type Config struct {
	// Files contains files to check. If specified, only these files will be checked.
	Files []string
	// Debug enables debug logging
	Debug bool
}

Config holds the configuration for the sorted analyzer

type Feature

type Feature struct {
	Name     string   // Name of the feature
	Comments []string // Comments associated with the feature
}

Feature represents a feature declaration with its associated comments

Jump to

Keyboard shortcuts

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