cmd

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version string
	Commit  string
	Date    string
)

TODO: This is a temporary UI, it's to help figure out the best experience, and it is not intended as a final face of vacuum. It's going to change around a good bit, so don't get too comfy with it :)

Functions

func BuildResults added in v0.0.4

func BuildResults(
	silent bool,
	hardMode bool,
	rulesetFlag string,
	specBytes []byte,
	customFunctions map[string]model.RuleFunction,
	base string,
	timeout time.Duration) (*model.RuleResultSet, *motor.RuleSetExecutionResult, error)

func BuildResultsWithDocCheckSkip added in v0.2.7

func BuildResultsWithDocCheckSkip(
	silent bool,
	hardMode bool,
	rulesetFlag string,
	specBytes []byte,
	customFunctions map[string]model.RuleFunction,
	base string,
	skipCheck bool,
	timeout time.Duration) (*model.RuleResultSet, *motor.RuleSetExecutionResult, error)

func BuildRuleSetFromUserSuppliedSet added in v0.0.5

func BuildRuleSetFromUserSuppliedSet(rsBytes []byte, rs rulesets.RuleSets) (*rulesets.RuleSet, error)

BuildRuleSetFromUserSuppliedSet creates a ready to run ruleset, augmented or provided by a user configured ruleset. This ruleset could be lifted directly from a Spectral configuration.

func CheckFailureSeverity added in v0.0.16

func CheckFailureSeverity(failSeverityFlag string, errors int, warnings int, informs int) error

func Execute

func Execute(version, commit, date string)

func GetBundleCommand added in v0.8.0

func GetBundleCommand() *cobra.Command

func GetDashboardCommand

func GetDashboardCommand() *cobra.Command

func GetGenerateRulesetCommand added in v0.0.5

func GetGenerateRulesetCommand() *cobra.Command

func GetGenerateVersionCommand added in v0.6.0

func GetGenerateVersionCommand() *cobra.Command

func GetHTMLReportCommand added in v0.0.2

func GetHTMLReportCommand() *cobra.Command

GetHTMLReportCommand returns a cobra command for generating an HTML Report.

func GetLanguageServerCommand added in v0.9.0

func GetLanguageServerCommand() *cobra.Command

func GetLintCommand added in v0.0.5

func GetLintCommand() *cobra.Command

func GetRootCommand added in v0.3.5

func GetRootCommand() *cobra.Command

func GetSpectralReportCommand

func GetSpectralReportCommand() *cobra.Command

func GetVacuumReportCommand added in v0.0.4

func GetVacuumReportCommand() *cobra.Command

func LoadCustomFunctions added in v0.0.11

func LoadCustomFunctions(functionsFlag string, silence bool) (map[string]model.RuleFunction, error)

LoadCustomFunctions will scan for (and load) custom functions defined as vacuum plugins.

func PrintBanner added in v0.0.5

func PrintBanner()

func RenderSummary added in v0.0.5

func RenderSummary(rs *model.RuleResultSet, silent bool, totalFiles, fileIndex int, filename, sev string)

func RenderTime added in v0.0.5

func RenderTime(timeFlag bool, duration time.Duration, fi int64)

RenderTime will render out the time taken to process a specification, and the size of the file in kb.

func RenderTimeAndFiles added in v0.5.1

func RenderTimeAndFiles(timeFlag bool, duration time.Duration, fileSize int64, totalFiles int)

RenderTimeAndFiles will render out the time taken to process a specification, and the size of the file in kb. it will also render out how many files were processed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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