bufstyle

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package bufstyle defines lint analyzers that help enforce Buf's Go code standards.

Package bufstyle defines lint analyzers that help enforce Buf's Go code standards.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyzerProvider

type AnalyzerProvider interface {
	Analyzers() []*analysis.Analyzer
}

AnalyzerProvider provides analyzers.

func NewAnalyzerProvider

func NewAnalyzerProvider(rootDirPath string, options ...AnalyzerProviderOption) (AnalyzerProvider, error)

NewAnalyzerProvider returns a new AnalyzerProvider.

type AnalyzerProviderOption

type AnalyzerProviderOption func(*analyzerProvider)

AnalyzerProviderOption is an option for a new AnalyzerProvider.

func WithIgnore

func WithIgnore(analyzerName string, relFilePath string) AnalyzerProviderOption

WithIgnore will ignore diagnostics for the given file path and analyzer name.

relFilePath should be relative to rootDirPath.

type ExternalConfig

type ExternalConfig struct {
	// Ignore is a map from analyzer name to a list of relative paths to ignore.
	Ignore map[string][]string `json:"ignore,omitempty" yaml:"ignore,omitempty"`
}

ExternalConfig is an external configuration for bufstyle.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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