lint

package
v0.6.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package lint provides the core functionality of easyp lint.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImportPath added in v0.4.0

type ImportPath string

ImportPath type alias for path import in proto file

func ConvertImportPath added in v0.4.0

func ConvertImportPath(source string) ImportPath

type Lint

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

Lint is the core functionality of easyp lint.

func New

func New(rules []Rule, ignoreDirs []string, deps []string) *Lint

New creates a new Lint.

func (*Lint) Lint

func (c *Lint) Lint(ctx context.Context, disk fs.FS) error

Lint lints the proto file.

type ProtoInfo

type ProtoInfo struct {
	Path                 string
	Info                 *unordered.Proto
	ProtoFilesFromImport map[ImportPath]*unordered.Proto
}

ProtoInfo is the information of a proto file.

type Rule

type Rule interface {
	// Validate validates the proto rule.
	Validate(ProtoInfo) []error
}

Rule is an interface for a rule checking.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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