buf: github.com/bufbuild/buf/internal/buf/bufcheck Index | Files | Directories

package bufcheck

import "github.com/bufbuild/buf/internal/buf/bufcheck"

Package bufcheck contains the implementations of the lint and breaking change detection checkers.

There is a lot of shared logic between the two, and originally they were actually combined into one logical entity (where some checks happened to be linters, and some checks happen to be breaking change detectors), so some of this is historical.

Index

Package Files

bufcheck.go

Variables

var AllCheckerFormatStrings = []string{
    "text",
    "json",
}

AllCheckerFormatStrings is all checker format strings.

func PrintCheckers Uses

func PrintCheckers(writer io.Writer, checkers []Checker, formatString string) (retErr error)

PrintCheckers prints the checkers to the writer.

The empty string defaults to text.

type Checker Uses

type Checker interface {
    json.Marshaler

    // ID returns the ID of the Checker.
    //
    // UPPER_SNAKE_CASE.
    ID() string
    // Categories returns the categories of the Checker.
    //
    // UPPER_SNAKE_CASE.
    // Sorted.
    Categories() []string
    // Purpose returns the purpose of the Checker.
    //
    // Full sentence.
    Purpose() string
}

Checker is a checker.

Directories

PathSynopsis
bufbreakingPackage bufbreaking contains the breaking change detection functionality.
bufbreaking/internal/bufbreakingbuildPackage bufbreakingbuild contains the CheckerBuilders used by bufbreakingv*.
bufbreaking/internal/bufbreakingcheckPackage bufbreakingcheck impelements the check functions.
bufbreaking/internal/bufbreakingv1beta1Package bufbreakingv1beta1 contains the VersionSpec for v1beta1.
buflintPackage buflint contains the linting functionality.
buflint/internal/buflintbuildPackage buflintbuild contains the CheckerBuilders used by buflintv*.
buflint/internal/buflintcheckPackage buflintcheck impelements the check functions.
buflint/internal/buflintv1beta1Package buflintv1beta1 contains the VersionSpec for v1beta1.
internal
internal/internaltesting

Package bufcheck imports 6 packages (graph) and is imported by 2 packages. Updated 2020-10-20. Refresh now. Tools for package owners.