Documentation
¶
Overview ¶
Package lint contains the public API of the k6 extension linter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Check ¶
type Check struct {
// Textual explanation of the check result.
//
Details string `json:"details,omitempty" yaml:"details,omitempty" mapstructure:"details,omitempty"`
// The ID of the checker.
//
// It identifies the method of check, not the execution of the check.
//
ID Checker `json:"id" yaml:"id" mapstructure:"id"`
// The result of the check.
//
// A true value of the passed property indicates a successful check, while a false
// value indicates a failure.
//
Passed bool `json:"passed" yaml:"passed" mapstructure:"passed"`
}
The result of a particular inspection.
type Checker ¶
type Checker string
const CheckerBuild Checker = "build"
const CheckerCodeowners Checker = "codeowners"
const CheckerExamples Checker = "examples"
const CheckerGit Checker = "git"
const CheckerLicense Checker = "license"
const CheckerModule Checker = "module"
const CheckerReadme Checker = "readme"
const CheckerReplace Checker = "replace"
const CheckerSecurity Checker = "security"
const CheckerSmoke Checker = "smoke"
const CheckerTypes Checker = "types"
const CheckerVersions Checker = "versions"
const CheckerVulnerability Checker = "vulnerability"
func ParseChecker ¶
ParseChecker parses checker name from string.
type Compliance ¶
type Compliance struct {
// Results of individual checks.
//
Checks []Check `json:"checks,omitempty" yaml:"checks,omitempty" mapstructure:"checks,omitempty"`
// The results of the checks are in the form of a grade.
//
Grade Grade `json:"grade" yaml:"grade" mapstructure:"grade"`
// Compliance expressed as a percentage.
//
Level int `json:"level" yaml:"level" mapstructure:"level"`
// Compliance check timestamp.
//
// The timestamp property contains the start timestamp of the check in Unix time
// format (the number of non-leap seconds that have elapsed since 00:00:00 UTC on
// 1st January 1970).
//
Timestamp float64 `json:"timestamp" yaml:"timestamp" mapstructure:"timestamp"`
}
The result of the extension's k6 compliance checks.
type Grade ¶
type Grade string
const GradeA Grade = "A"
const GradeB Grade = "B"
const GradeC Grade = "C"
const GradeD Grade = "D"
const GradeE Grade = "E"
const GradeF Grade = "F"
const GradeG Grade = "G"
const GradeZ Grade = "Z"
type Options ¶
type Options struct {
// Passed contains a list of checkers that have already been marked as successful.
Passed []Checker
// Official can be set true to enable extra checkers (like codeowners) for official extensions.
Official bool
}
Options contains settings that modify the linter's operation.
Click to show internal directories.
Click to hide internal directories.