cmd

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2019 License: MPL-2.0 Imports: 15 Imported by: 0

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"`
	Format          string `short:"f" long:"format" description:"Output format" choice:"default" choice:"json" choice:"checkstyle" default:"default"`
	Config          string `short:"c" long:"config" description:"Config file name" value-name:"FILE" default:".tflint.hcl"`
	IgnoreModule    string `long:"ignore-module" description:"Ignore module sources" value-name:"SOURCE1,SOURCE2..."`
	IgnoreRule      string `long:"ignore-rule" description:"Ignore rule names" value-name:"RULE1,RULE2..."`
	Varfile         string `long:"var-file" description:"Terraform variable file names" value-name:"FILE1,FILE2..."`
	Deep            bool   `long:"deep" description:"Enable deep check mode"`
	AwsAccessKey    string `long:"aws-access-key" description:"AWS access key used in deep check mode" value-name:"ACCESS_KEY"`
	AwsSecretKey    string `long:"aws-secret-key" description:"AWS secret key used in deep check mode" value-name:"SECRET_KEY"`
	AwsProfile      string `long:"aws-profile" description:"AWS shared credential profile name used in deep check mode" value-name:"PROFILE"`
	AwsRegion       string `long:"aws-region" description:"AWS region used in deep check mode" value-name:"REGION"`
	ErrorWithIssues bool   `long:"error-with-issues" description:"Return error code when issues exist"`
	Fast            bool   `long:"fast" description:"Ignore slow rules (aws_instance_invalid_ami only)"`
	Quiet           bool   `short:"q" long:"quiet" description:"Do not output any message when no issues are found (default format only)"`
}

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