cli

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	// FileFinder interface to search for the files
	// in the SearchPath
	Finder finder.FileFinder
	// The root directory to begin searching for files
	SearchPath string
	// An array of subdirectories to exclude when searching
	ExcludeDir []string
	// An array of file types that are supported by the validator
	FileTypes []filetype.FileType
	// Reporter interface for outputting the results of the
	// the CLI run
	Reporter reporter.Reporter
}

func Init

func Init(searchPath string, excludeDirs []string) CLI

Initialize the CLI object with default values

func (CLI) Run

func (c CLI) Run() (int, error)

The Run method performs the following actions: - Finds the calls the Find method from the Finder interface to return a list of files - Reads each file that was found - Calls the Validate method from the Validator interface to validate the file - Outputs the results using the Reporter

Jump to

Keyboard shortcuts

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