analysis

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 4 Imported by: 42

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer struct {
	// Name of the analyzer.
	Name string

	// Doc is the documentation for the analyzer.
	Doc string

	// Run the analyzer.
	Run func(*Pass) error
}

An Analyzer describes an analysis function and its options.

func (*Analyzer) Title

func (a *Analyzer) Title() string

Title is the part before the first "\n\n" of the documentation.

func (*Analyzer) Validate

func (a *Analyzer) Validate() error

Validate the analyzer metadata.

type Diagnostic

type Diagnostic struct {
	Pos     scanner.Position
	Message string
}

A Diagnostic is a message associated with a source location.

type Pass

type Pass struct {
	Analyzer    *Analyzer
	File        *dbc.File
	Diagnostics []*Diagnostic
}

Pass is the interface to the run function that analyzes DBC definitions.

func (*Pass) Reportf

func (pass *Pass) Reportf(pos scanner.Position, format string, args ...interface{})

Reportf reports a diagnostic by building a message from the provided format and args.

Jump to

Keyboard shortcuts

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