bufstyle

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: Apache-2.0 Imports: 6 Imported by: 1

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 added in v1.1.0

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

AnalyzerProvider provides analyzers.

func NewAnalyzerProvider added in v1.1.0

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

NewAnalyzerProvider returns a new AnalyzerProvider.

type AnalyzerProviderOption added in v1.1.0

type AnalyzerProviderOption func(*analyzerProvider)

AnalyzerProviderOption is an option for a new AnalyzerProvider.

func WithIgnore added in v1.1.0

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 added in v1.1.0

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