transformer

package
v0.0.0-...-efd69ef Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertBadgeResultsToSarif

func ConvertBadgeResultsToSarif(testedRepository string, isRepoMirrored bool, badges []badges.Badge) ([]byte, error)

func ConvertToDatabaseModel

func ConvertToDatabaseModel(testedRepository string, hasPublicCodeYAML *bool, badges []badges.Badge) (db.Report, error)

Types

type Properties

type Properties struct {
	Unit      string    `json:"unit"`
	Threshold Threshold `json:"threshold,omitempty"`
}

type SarifRule

type SarifRule struct {
	ID              string     `json:"id"`
	Name            string     `json:"name"`
	FullDescription TextNode   `json:"fullDescription"`
	Properties      Properties `json:"properties"`
}

type TextNode

type TextNode struct {
	Text string `json:"text"`
}

type Threshold

type Threshold struct {
	Min               *int `json:"min,omitempty"` // nil means no lower bound
	Max               *int `json:"max,omitempty"` // nil means no upper bound
	TimeRangeInMonths *int `json:"timeRangeInMonths,omitempty"`
}

Source Files

  • db.go
  • sarif.go

Jump to

Keyboard shortcuts

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