pkg

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScorecardResult

type ScorecardResult struct {
	Repo     string
	Date     string
	Checks   []checker.CheckResult
	Metadata []string
}

func RunScorecards

func RunScorecards(ctx context.Context,
	repo repos.RepoURL,
	checksToRun checker.CheckNameToFnMap,
	repoClient clients.RepoClient,
	httpClient *http.Client,
	githubClient *github.Client,
	graphClient *githubv4.Client) (ScorecardResult, error)

func (*ScorecardResult) AsCSV

func (r *ScorecardResult) AsCSV(showDetails bool, logLevel zapcore.Level, writer io.Writer) error

func (*ScorecardResult) AsJSON

func (r *ScorecardResult) AsJSON(showDetails bool, logLevel zapcore.Level, writer io.Writer) error

AsJSON outputs the result in JSON format with a newline at the end. If called on []ScorecardResult will create NDJson formatted output.

func (*ScorecardResult) AsString

func (r *ScorecardResult) AsString(showDetails bool, logLevel zapcore.Level, writer io.Writer) error

UPGRADEv2: will be removed.

func (*ScorecardResult) AsString2

func (r *ScorecardResult) AsString2(showDetails bool, logLevel zapcore.Level, writer io.Writer) error

UPGRADEv2: new code.

Jump to

Keyboard shortcuts

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