ignore

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadIgnoreAnnotations

func ReadIgnoreAnnotations(cfg *config.Config, pass *analysis.Pass) *util.IgnoreSet

ReadIgnoreAnnotations scans pass for @ignore annotations and returns IgnoreSet This function looks for @ignore comments and determines their scope

Types

type IgnoreAnnotation

type IgnoreAnnotation struct {
	// List of error codes to ignore (e.g., ["CODE1", "CODE2"])
	Codes []string

	// Start position of the ignore directive (comment position)
	StartPos token.Pos

	// End position where ignore directive ends
	// For now, this is the position of the next statement after the comment
	EndPos token.Pos
}

IgnoreAnnotation represents parsed @ignore CODE1, CODE2 annotation @immutable @implements &util.IgnoreAnnotation @constructor parseIgnoreAnnotation

func (*IgnoreAnnotation) GetCodes

func (a *IgnoreAnnotation) GetCodes() []string

GetCodes returns the list of error codes

func (*IgnoreAnnotation) GetEndPos

func (a *IgnoreAnnotation) GetEndPos() token.Pos

GetEndPos returns the end position

func (*IgnoreAnnotation) GetStartPos

func (a *IgnoreAnnotation) GetStartPos() token.Pos

GetStartPos returns the start position

type IgnoreResult

type IgnoreResult struct {
	IgnoreSet *util.IgnoreSet
}

IgnoreResult is the result type returned by IgnoreReader analyzer It contains all @ignore annotations found in the package using optimized IgnoreSet @immutable

Jump to

Keyboard shortcuts

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