load_errors

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveErrorsListToFile

func SaveErrorsListToFile(errs ErrorsList, filename string) error

SaveErrorsListToFile writes a list of AbstractSemgrepError nodes to a JSON file.

Types

type AbstractSemgrepError

type AbstractSemgrepError interface {
	// contains filtered or unexported methods
}

func UnmarshalRootError

func UnmarshalRootError(b []byte) (AbstractSemgrepError, error)

type AbstractSemgrepErrorWrapper

type AbstractSemgrepErrorWrapper struct {
	AbstractSemgrepError
}

type ErrorsList

type ErrorsList []*AbstractSemgrepErrorWrapper

func UnmarshalErrorArray

func UnmarshalErrorArray(b []byte) (*ErrorsList, error)

func (*ErrorsList) UnmarshalJSON

func (el *ErrorsList) UnmarshalJSON(b []byte) error

func (ErrorsList) UpdateRuleId

func (semgrepLoadErrors ErrorsList) UpdateRuleId(absRulesPath, userRulesPath string)

type Level

type Level string
const (
	LevelTrace Level = "TRACE"
	LevelDebug Level = "DEBUG"
	LevelInfo  Level = "INFO"
	LevelWarn  Level = "WARN"
	LevelError Level = "ERROR"
)

type Reason

type Reason string
const (
	ReasonError          Reason = "ERROR"
	ReasonWarning        Reason = "WARNING"
	ReasonNotImplemented Reason = "NOT_IMPLEMENTED"
)

type SemgrepError

type SemgrepError struct {
	Type    *string     `json:"type"` // "SemgrepError"
	Step    *Step       `json:"step"`
	Message *string     `json:"message"`
	Level   *Level      `json:"level"`
	Reason  *Reason     `json:"reason"`
	Errors  *ErrorsList `json:"errors"`
}

type SemgrepFileErrors

type SemgrepFileErrors struct {
	Type   *string     `json:"type"` // "SemgrepFile"
	Path   *string     `json:"path"`
	Errors *ErrorsList `json:"errors"`
}

type SemgrepRuleErrors

type SemgrepRuleErrors struct {
	Type         *string     `json:"type"` // "SemgrepRule"
	RuleID       *string     `json:"ruleId"`
	RuleIDInFile *string     `json:"ruleIdInFile"`
	Errors       *ErrorsList `json:"errors"`
}

type Step

type Step string
const (
	StepLoadRuleset               Step = "LOAD_RULESET"
	StepBuildConvertToRawRule     Step = "BUILD_CONVERT_TO_RAW_RULE"
	StepBuildParseSemgrepRule     Step = "BUILD_PARSE_SEMGREP_RULE"
	StepBuildMetaVarResolving     Step = "BUILD_META_VAR_RESOLVING"
	StepBuildActionListConversion Step = "BUILD_ACTION_LIST_CONVERSION"
	StepBuildTransformToAutomata  Step = "BUILD_TRANSFORM_TO_AUTOMATA"
	StepAutomataToTaintRule       Step = "AUTOMATA_TO_TAINT_RULE"
)

Jump to

Keyboard shortcuts

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