linter

package
v0.0.0-...-f80e778 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckError

type CheckError struct {
	Code  string
	Level string
	Msg   string
}

type CheckPos

type CheckPos struct {
	Coll int32
	Line int32
}

type CheckResult

type CheckResult struct {
	Pos CheckPos
	Err CheckError
}

type HadolintAdapter

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

HadolintAdapter wrapper for hadolint CLI

func NewHadolintAdapter

func NewHadolintAdapter(appConfig *configs.AppConfig) *HadolintAdapter

func (*HadolintAdapter) Check

func (l *HadolintAdapter) Check(file *os.File) ([]CheckResult, error)

Check call hadolint CLI to check Dockerfile

type HadolintResult

type HadolintResult struct {
	Code    string `json:"code"`
	Coll    int32  `json:"column"`
	File    string `json:"file,omitempty"`
	Level   string `json:"level"`
	Line    int32  `json:"line"`
	Message string `json:"message"`
}

type ILinter

type ILinter interface {
	Check(file *os.File) ([]CheckResult, error)
}

type MockLinter

type MockLinter struct {
	mock.Mock
}

MockLinter is a mock implementation of the ILinter interface.

func (*MockLinter) Check

func (m *MockLinter) Check(file *os.File) ([]CheckResult, error)

type TrivyAdapter

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

func NewTrivyAdapter

func NewTrivyAdapter(appConfig *configs.AppConfig) *TrivyAdapter

func (*TrivyAdapter) Check

func (l *TrivyAdapter) Check(file *os.File) ([]CheckResult, error)

Jump to

Keyboard shortcuts

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