models

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GC001 = RuleCode("GC001")
	GC002 = RuleCode("GC002")
	GC013 = RuleCode("GC013")
	GC021 = RuleCode("GC021")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Golangci

type Golangci interface {
	GetLinters() (Linters, bool)
	GetComment(path string) (string, bool)
	Marshal() ([]byte, error)
}

func Parse

func Parse(input []byte) (Golangci, error)

type Linters

type Linters interface {
	GetEnable() ([]string, bool)
	GetDisable() ([]string, bool)
	GetFieldNames() ([]string, bool)
	GetSettings() (Settings, bool)

	SortEnable() error
	SortDisable() error
	SortFields(order map[string]int) error
	SortSettings() error
}

type Report

type Report struct {
	Rule    RuleCode
	Message string
}

func (Report) String

func (r Report) String() string

type RuleCode

type RuleCode string

type Settings

type Settings interface {
	GetSetting(key string) (any, bool)
	GetKeys() ([]string, bool)
	Sort() error
}

type YamlGolangci

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

func (YamlGolangci) GetComment

func (g YamlGolangci) GetComment(path string) (string, bool)

func (YamlGolangci) GetLinters

func (g YamlGolangci) GetLinters() (Linters, bool)

func (YamlGolangci) Marshal

func (g YamlGolangci) Marshal() ([]byte, error)

type YamlLinters

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

func (YamlLinters) GetDisable

func (l YamlLinters) GetDisable() ([]string, bool)

func (YamlLinters) GetEnable

func (l YamlLinters) GetEnable() ([]string, bool)

func (YamlLinters) GetFieldNames

func (l YamlLinters) GetFieldNames() ([]string, bool)

func (YamlLinters) GetSettings

func (l YamlLinters) GetSettings() (Settings, bool)

func (YamlLinters) SortDisable

func (l YamlLinters) SortDisable() error

func (YamlLinters) SortEnable

func (l YamlLinters) SortEnable() error

func (YamlLinters) SortFields

func (l YamlLinters) SortFields(expectedOrder map[string]int) error

func (YamlLinters) SortSettings

func (l YamlLinters) SortSettings() error

type YamlSettings

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

func (YamlSettings) GetKeys

func (y YamlSettings) GetKeys() ([]string, bool)

func (YamlSettings) GetSetting

func (y YamlSettings) GetSetting(key string) (any, bool)

func (YamlSettings) Sort

func (y YamlSettings) Sort() error

Jump to

Keyboard shortcuts

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