engine

package
v0.0.0-...-a4c7985 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CyclomaticComplexity = "cyclo"
	UintTest             = "unittest"
	BigFile              = "bigFile"
	LongFunc             = "longFunc"
	CopyCheck            = "copyCheck"
	Security             = "security"
	Syntax               = "syntax"
)
View Source
const (
	Json    = "json"
	Console = "console"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BigFileConfig

type BigFileConfig struct {
	MaxLines int `yaml:"maxLines"`
}

type Clone

type Clone struct {
	Filename  string `json:"filename"`
	LineStart int    `json:"lineStart"`
	LineEnd   int    `json:"lineEnd"`
	Fragment  []byte `json:"fragment"`
}

type Config

type Config struct {
	IgnoreError     bool                  `yaml:"ignoreError"`
	ReportType      string                `yaml:"reportType"`
	Linters         LintersConfig         `yaml:"linters"`
	LintersSettings LintersSettingsConfig `yaml:"linters-settings"`
}

func DefaultConfig

func DefaultConfig() Config

func (*Config) UnmarshalYAML

func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error

type CopyCheckConfig

type CopyCheckConfig struct {
	Threshold  int    `yaml:"threshold"`
	IgnoreRegx string `yaml:"ignoreRegx"`
}

type CycloConfig

type CycloConfig struct {
	IgnoreRegx string `yaml:"ignoreRegx"`
	Over       int    `yaml:"over"`
}

type Executor

type Executor interface {
	Compute(param Parameter, config Config) Summary
}

type LintersConfig

type LintersConfig struct {
	Enable []string `yaml:"enable"`
}

type LintersSettingsConfig

type LintersSettingsConfig struct {
	Cyclo     CycloConfig     `yaml:"cyclo"`
	BigFile   BigFileConfig   `yaml:"bigFile"`
	LongFunc  LongFuncConfig  `yaml:"longFunc"`
	CopyCheck CopyCheckConfig `yaml:"copyCheck"`
	Security  SecurityConfig  `yaml:"security"`
}

type LongFuncConfig

type LongFuncConfig struct {
	MaxLength int `yaml:"maxLength"`
}

type Parameter

type Parameter struct {
	Path []string
}

type SecurityConfig

type SecurityConfig struct {
	Env []string `yaml:"env"`
}

type Summary

type Summary struct {
	Name     string                 `json:"name"`
	Value    float64                `json:"value"`
	Details  map[string]interface{} `json:"details"`
	Duration float64                `json:"duration"`
	Err      error                  `json:"error"`
}

func RunAllTools

func RunAllTools(param Parameter, config Config) []Summary

func (Summary) Print

func (s Summary) Print()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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