normalizer

package
v0.0.0-...-737923f Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package normalizer converts tool output into findings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Language    string
	RuleID      string
	Message     string
	SeverityMap map[string]finding.Severity
}

Config is the binding-derived data a normalizer is compiled against.

type Context

type Context struct {
	Gate string
	Root string
}

Context supplies the gate metadata and repository used during normalization.

type Normalizer

type Normalizer interface {
	Normalize(ctx Context, raw []byte) ([]finding.Finding, error)
}

Normalizer is one tool's parser, compiled against its binding's Config.

func Parse

func Parse(name string, cfg Config) (Normalizer, error)

Parse resolves and compiles a normalizer name against its binding config. This is the single home of the normalizer-name grammar: a name that Parse accepts is guaranteed runnable, so grammar mistakes surface at gate load time rather than as errored gates mid-run.

Jump to

Keyboard shortcuts

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