Documentation
¶
Overview ¶
Package testutil provides testing utilities and mock implementations for the PI scanner. It includes mock detectors, test data generators, and helper functions for writing comprehensive tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockContextDetector ¶
type MockContextDetector struct {
// contains filtered or unexported fields
}
MockContextDetector wraps a base detector and applies simple context filtering
func NewMockContextDetector ¶
func NewMockContextDetector(base detection.Detector) *MockContextDetector
NewMockContextDetector creates a detector that filters out obvious false positives
func (*MockContextDetector) Detect ¶
func (mcd *MockContextDetector) Detect(ctx context.Context, content []byte, filename string) ([]detection.Finding, error)
Detect runs the base detector and then filters results based on context
func (*MockContextDetector) Name ¶
func (mcd *MockContextDetector) Name() string
Name returns the detector name
Click to show internal directories.
Click to hide internal directories.