cmd

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2021 License: MPL-2.0 Imports: 25 Imported by: 5

Documentation

Index

Constants

View Source
const (
	ExitCodeOK    int = 0
	ExitCodeError int = 1 + iota
	ExitCodeIssuesFound
)

Exit codes are int values that represent an exit code for a particular error.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	// contains filtered or unexported fields
}

CLI is the command line object

func NewCLI

func NewCLI(outStream io.Writer, errStream io.Writer) *CLI

NewCLI returns new CLI initialized by input streams

func (*CLI) Run

func (cli *CLI) Run(args []string) int

Run invokes the CLI with the given arguments.

type Options

type Options struct {
	Version        bool     `short:"v" long:"version" description:"Print TFLint version"`
	Init           bool     `long:"init" description:"Install plugins"`
	Langserver     bool     `long:"langserver" description:"Start language server"`
	Format         string   `` /* 152-byte string literal not displayed */
	Config         string   `short:"c" long:"config" description:"Config file name" value-name:"FILE" default:".tflint.hcl"`
	IgnoreModules  []string `long:"ignore-module" description:"Ignore module sources" value-name:"SOURCE"`
	EnableRules    []string `long:"enable-rule" description:"Enable rules from the command line" value-name:"RULE_NAME"`
	DisableRules   []string `long:"disable-rule" description:"Disable rules from the command line" value-name:"RULE_NAME"`
	Only           []string `` /* 133-byte string literal not displayed */
	EnablePlugins  []string `long:"enable-plugin" description:"Enable plugins from the command line" value-name:"PLUGIN_NAME"`
	Varfiles       []string `long:"var-file" description:"Terraform variable file name" value-name:"FILE"`
	Variables      []string `long:"var" description:"Set a Terraform variable" value-name:"'foo=bar'"`
	Module         bool     `long:"module" description:"Inspect modules"`
	Force          bool     `long:"force" description:"Return zero exit status even if issues found"`
	NoColor        bool     `long:"no-color" description:"Disable colorized output"`
	LogLevel       string   `long:"loglevel" description:"Change the loglevel" choice:"trace" choice:"debug" choice:"info" choice:"warn" choice:"error"`
	ActAsAwsPlugin bool     `long:"act-as-aws-plugin" hidden:"true"`
}

Options is an option specified by arguments.

Jump to

Keyboard shortcuts

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