Skip to content

Commit

Permalink
fix: update usage to cobra format and commands to use --
Browse files Browse the repository at this point in the history
  • Loading branch information
1garo committed Apr 12, 2024
1 parent e220a4a commit d78ef64
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 62 deletions.
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,28 +91,28 @@ go install github.com/Boeing/config-file-validator/cmd/[email protected]

## Usage
```
Usage: validator [OPTIONS] [<search_path>...]
positional arguments:
search_path: The search path on the filesystem for configuration files. Defaults to the current working directory if no search_path provided. Multiple search paths can be declared separated by a space.
optional flags:
-depth int
Depth of recursion for the provided search paths. Set depth to 0 to disable recursive path traversal
-exclude-dirs string
Subdirectories to exclude when searching for configuration files
-exclude-file-types string
A comma separated list of file types to ignore
-output string
Destination to a file to output results
-quiet
If quiet flag is set. It doesn't print any output to stdout.
-groupby string
Group the output by filetype, pass-fail, or directory. Supported Reporters are Standard and JSON
-reporter string
Format of the printed report. Options are standard and json (default "standard")
-version
Version prints the release version of validator
Cross Platform tool to validate configuration files
Usage:
validator [flags]
validator [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
version Version prints the release version of validator
Flags:
--depth int Depth of recursion for the provided search paths. Set depth to 0 to disable recursive path traversal.
--exclude-dirs string Subdirectories to exclude when searching for configuration files
--exclude-file-types string A comma separated list of file types to ignore
--groupby string Group output by filetype, directory, pass-fail. Supported for Standard and JSON reports
-h, --help help for validator
--output string Destination to a file to output results
--quiet If quiet flag is set. It doesn't print any output to stdout.
--reporter string Format of the printed report. Options are standard and json (default "standard")
Use "validator [command] --help" for more information about a command.
```

### Examples
Expand Down
40 changes: 22 additions & 18 deletions cmd/validator/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,28 @@ validates them using the go package for each configuration type.
Currently Apple PList XML, CSV, HCL, HOCON, INI, JSON, Properties, TOML, XML, and YAML.
configuration file types are supported.
Usage: [OPTIONS] [<search_path>...]
positional arguments:
search_path: The search path on the filesystem for configuration files. Defaults to the current working directory if no search_path provided. Multiple search paths can be declared separated by a space.
optional flags:
-depth int
Depth of recursion for the provided search paths. Set depth to 0 to disable recursive path traversal
-exclude-dirs string
Subdirectories to exclude when searching for configuration files
-exclude-file-types string
A comma separated list of file types to ignore
-output
Destination of a file to outputting results
-reporter string
Format of the printed report. Options are standard and json (default "standard")
-version
Version prints the release version of validator
Cross Platform tool to validate configuration files
Usage:
validator [flags]
validator [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
version Version prints the release version of validator
Flags:
--depth int Depth of recursion for the provided search paths. Set depth to 0 to disable recursive path traversal.
--exclude-dirs string Subdirectories to exclude when searching for configuration files
--exclude-file-types string A comma separated list of file types to ignore
--groupby string Group output by filetype, directory, pass-fail. Supported for Standard and JSON reports
-h, --help help for validator
--output string Destination to a file to output results
--quiet If quiet flag is set. It doesn't print any output to stdout.
--reporter string Format of the printed report. Options are standard and json (default "standard")
Use "validator [command] --help" for more information about a command.
*/

package cmd
Expand Down
44 changes: 22 additions & 22 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,28 +111,28 @@ go install github.com/Boeing/config-file-validator/cmd/[email protected]

## Usage
```
Usage: validator [OPTIONS] [<search_path>...]
positional arguments:
search_path: The search path on the filesystem for configuration files. Defaults to the current working directory if no search_path provided. Multiple search paths can be declared separated by a space.
optional flags:
-depth int
Depth of recursion for the provided search paths. Set depth to 0 to disable recursive path traversal
-exclude-dirs string
Subdirectories to exclude when searching for configuration files
-exclude-file-types string
A comma separated list of file types to ignore
-groupby string
Group output by filetype, directory, pass-fail. Supported for Standard and JSON reports
-output string
Destination to a file to output results
-quiet
If quiet flag is set. It doesn't print any output to stdout.
-reporter string
Format of the printed report. Options are standard and json (default "standard")
-version
Version prints the release version of validator
Cross Platform tool to validate configuration files
Usage:
validator [flags]
validator [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
version Version prints the release version of validator
Flags:
--depth int Depth of recursion for the provided search paths. Set depth to 0 to disable recursive path traversal.
--exclude-dirs string Subdirectories to exclude when searching for configuration files
--exclude-file-types string A comma separated list of file types to ignore
--groupby string Group output by filetype, directory, pass-fail. Supported for Standard and JSON reports
-h, --help help for validator
--output string Destination to a file to output results
--quiet If quiet flag is set. It doesn't print any output to stdout.
--reporter string Format of the printed report. Options are standard and json (default "standard")
Use "validator [command] --help" for more information about a command.
```

### Examples
Expand Down

0 comments on commit d78ef64

Please sign in to comment.