mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-02 14:46:31 +00:00
c28f7cb29f
Initial part of #435
28 lines
587 B
Go
28 lines
587 B
Go
// Copyright (c) 2017, Daniel Martí <mvdan@mvdan.cc>
|
|
// See LICENSE for licensing information
|
|
|
|
// Package lint defines common interfaces for Go code checkers.
|
|
package lint // import "mvdan.cc/lint"
|
|
|
|
import (
|
|
"go/token"
|
|
|
|
"golang.org/x/tools/go/loader"
|
|
"golang.org/x/tools/go/ssa"
|
|
)
|
|
|
|
// A Checker points out issues in a program.
|
|
type Checker interface {
|
|
Program(*loader.Program)
|
|
Check() ([]Issue, error)
|
|
}
|
|
|
|
type WithSSA interface {
|
|
ProgramSSA(*ssa.Program)
|
|
}
|
|
|
|
// Issue represents an issue somewhere in a source code file.
|
|
type Issue interface {
|
|
Pos() token.Pos
|
|
Message() string
|
|
}
|