Documentation ¶
Overview ¶
Package reporting is the shac starlark engine reporting implementation.
Index ¶
- type MultiReport
- func (t *MultiReport) CheckCompleted(ctx context.Context, check string, start time.Time, d time.Duration, ...)
- func (t *MultiReport) Close() error
- func (t *MultiReport) EmitArtifact(ctx context.Context, check, root, file string, content []byte) error
- func (t *MultiReport) EmitFinding(ctx context.Context, check string, level engine.Level, ...) error
- func (t *MultiReport) Print(ctx context.Context, check, file string, line int, message string)
- type Report
- type SarifReport
- func (sr *SarifReport) CheckCompleted(ctx context.Context, check string, start time.Time, d time.Duration, ...)
- func (sr *SarifReport) Close() error
- func (sr *SarifReport) EmitArtifact(ctx context.Context, root, check, file string, content []byte) error
- func (sr *SarifReport) EmitFinding(ctx context.Context, check string, level engine.Level, ...) error
- func (sr *SarifReport) Print(context.Context, string, string, int, string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultiReport ¶
type MultiReport struct {
Reporters []Report
}
MultiReport is a Report that wraps any number of other Report objects and tees output to all of them.
func Get ¶
func Get(ctx context.Context) (*MultiReport, error)
Get returns the right reporting implementation based on the current environment.
func (*MultiReport) CheckCompleted ¶
func (*MultiReport) Close ¶
func (t *MultiReport) Close() error
func (*MultiReport) EmitArtifact ¶
func (*MultiReport) EmitFinding ¶
type SarifReport ¶
type SarifReport struct { // SARIF output gets written here when Close() is called. Out io.Writer // contains filtered or unexported fields }
SarifReport converts findings into SARIF JSON output.
func (*SarifReport) CheckCompleted ¶
func (*SarifReport) Close ¶
func (sr *SarifReport) Close() error
func (*SarifReport) EmitArtifact ¶
func (*SarifReport) EmitFinding ¶
Click to show internal directories.
Click to hide internal directories.