Skip to content

Commit

Permalink
README updates for v1.6.0 release (#128)
Browse files Browse the repository at this point in the history
* README updates for v1.6.0 release

* updating index

* updating the usage

* updating to 1.6.0

* rebasing and applying changes to index
  • Loading branch information
kehoecj authored Mar 29, 2024
1 parent 1ecceed commit 56a2715
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 33 deletions.
57 changes: 38 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* CSV
* ENV
* HCL
* HOCON
* INI
* JSON
* Properties
Expand All @@ -54,19 +55,19 @@ We offer Alpine, Ubuntu, and Scratch containers
#### Alpine

```
docker pull ghcr.io/boeing/config-file-validator:v1.5.0
docker pull ghcr.io/boeing/config-file-validator:v1.6.0
```

#### Ubuntu

```
docker pull ghcr.io/boeing/config-file-validator-ubuntu:v1.5.0
docker pull ghcr.io/boeing/config-file-validator-ubuntu:v1.6.0
```

#### Scratch

```
docker pull ghcr.io/boeing/config-file-validator-scratch:v1.5.0
docker pull ghcr.io/boeing/config-file-validator-scratch:v1.6.0
```

### Binary Releases
Expand All @@ -91,15 +92,15 @@ makepkg -si
If you have a go environment on your desktop you can use [go install](https://go.dev/doc/go-get-install-deprecation) to install the validator executable. The validator executable will be installed to the directory named by the GOBIN environment variable, which defaults to $GOPATH/bin or $HOME/go/bin if the GOPATH environment variable is not set.

```
go install github.com/Boeing/config-file-validator/cmd/validator@v1.5.0
go install github.com/Boeing/config-file-validator/cmd/validator@v1.6.0
```

## 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.
search_path: The search path on the filesystem for configuration files. Defaults to the current working directory if no search_path provided
optional flags:
-depth int
Expand All @@ -108,10 +109,12 @@ optional flags:
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
-groupby string
Group the output by filetype, pass-fail, or directory. Supported Reporters are Standard and JSON
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
Expand Down Expand Up @@ -145,7 +148,7 @@ validator --exclude-dirs=/path/to/search/tests /path/to/search
![Exclude Dirs Run](./img/exclude_dirs.png)

#### Exclude file types
Exclude file types in the search path. Available file types are `csv`, `env`, `hcl`, `ini`, `json`, `plist`, `properties`, `toml`, `xml`, `yaml`, and `yml`
Exclude file types in the search path. Available file types are `csv`, `env`, `hcl`, `hocon`, `ini`, `json`, `plist`, `properties`, `toml`, `xml`, `yaml`, and `yml`

```
validator --exclude-file-types=json /path/to/search
Expand All @@ -163,37 +166,53 @@ validator --depth=0 /path/to/search
![Custom Recursion Run](./img/custom_recursion.png)

#### Customize report output
Customize the report output. Available options are `standard` and `json`
Customize the report output. Available options are `standard`, `junit`, and `json`

```
validator --reporter=json /path/to/search
```

![Exclude File Types Run](./img/custom_reporter.png)

#### Output results to a file
Output report results to a file (default name is `result.{extension}`). Must provide reporter flag with a supported extension format (Available option is `json`). If an existing directory is provided, create a file named default name in the given directory. If a file name is provided, create a file named the given name at the current working directory.
```
validator --reporter=json --output=/path/to/dir
```

### Group report output
Group the report output by file type, directory, or pass-fail. Supports one or more groupings.

```
validator -groupby filetype
```

![Groupby File Type](./img/gb-filetype.png)

#### Multiple groups
```
validator -groupby directory,pass-fail
```

![Groupby File Type and Pass/Fail](./img/gb-filetype-and-pass-fail.png)

### Output results to a file
Output report results to a file (default name is `result.{extension}`). Must provide reporter flag with a supported extension format. Available options are `junit` and `json`. If an existing directory is provided, create a file named default name in the given directory. If a file name is provided, create a file named the given name at the current working directory.

```
validator --reporter=json --output=/path/to/dir
```

### Suppress output
Passing the `--quiet` flag suppresses all output to stdout. If there are invalid config files the validator tool will exit with 1. Any errors in execution such as an invalid path will still be displayed.

```
validator --quiet /path/to/search
```

#### Container Run
```
docker run -it --rm -v /path/to/config/files:/test config-file-validator:1.5.0 /test
docker run -it --rm -v /path/to/config/files:/test config-file-validator:1.6.0 /test
```

![Docker Standard Run](./img/docker_run.png)

## Build
The project can be downloaded and built from source using an environment with Go 1.21 installed. After a successful build, the binary can be moved to a location on your operating system PATH.
The project can be downloaded and built from source using an environment with Go 1.21+ installed. After a successful build, the binary can be moved to a location on your operating system PATH.

### macOS
#### Build
Expand Down Expand Up @@ -257,7 +276,7 @@ cp .\validator.exe 'C:\Program Files\validator'
You can also use the provided Dockerfile to build the config file validator tool as a container

```
docker build . -t config-file-validator:v1.5.0
docker build . -t config-file-validator:v1.6.0
```

## Contributors
Expand Down
Binary file added img/gb-filetype-and-pass-fail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/gb-filetype.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 50 additions & 14 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
## Supported config files formats:
* Apple PList XML
* CSV
* ENV
* HCL
* HOCON
* INI
Expand All @@ -63,24 +64,24 @@ There are several ways to install the config file validator tool

### Docker

We offer Alpine, Ubuntu, and scratch containers
We offer Alpine, Ubuntu, and Scratch containers

#### Alpine

```
docker pull ghcr.io/boeing/config-file-validator:v1.5.0
docker pull ghcr.io/boeing/config-file-validator:v1.6.0
```

#### Ubuntu

```
docker pull ghcr.io/boeing/config-file-validator-ubuntu:v1.5.0
docker pull ghcr.io/boeing/config-file-validator-ubuntu:v1.6.0
```

#### Scratch

```
docker pull ghcr.io/boeing/config-file-validator-scratch:v1.5.0
docker pull ghcr.io/boeing/config-file-validator-scratch:v1.6.0
```

### Binary Releases
Expand All @@ -105,15 +106,15 @@ makepkg -si
If you have a go environment on your desktop you can use [go install](https://go.dev/doc/go-get-install-deprecation) to install the validator executable. The validator executable will be installed to the directory named by the GOBIN environment variable, which defaults to $GOPATH/bin or $HOME/go/bin if the GOPATH environment variable is not set.

```
go install github.com/Boeing/config-file-validator/cmd/validator@v1.5.0
go install github.com/Boeing/config-file-validator/cmd/validator@v1.6.0
```

## 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.
search_path: The search path on the filesystem for configuration files. Defaults to the current working directory if no search_path provided
optional flags:
-depth int
Expand All @@ -122,6 +123,12 @@ optional flags:
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
Expand All @@ -138,7 +145,7 @@ validator /path/to/search
![Standard Run](./img/standard_run.png)

#### Multiple search paths
Multiple search paths are supported and the results will be merged into a single report
Multiple search paths are supported, and the results will be merged into a single report
```
validator /path/to/search /another/path/to/search
```
Expand All @@ -149,13 +156,13 @@ validator /path/to/search /another/path/to/search
Exclude subdirectories in the search path

```
validator --exclude-dirs=/path/to/search/tests /path/to/search
validator --exclude-dirs=/path/to/search/tests /path/to/search
```

![Exclude Dirs Run](./img/exclude_dirs.png)

#### Exclude file types
Exclude file types in the search path. Available file types are `csv`, `hcl`, `hocon`, `ini`, `json`, `plist`, `properties`, `toml`, `xml`, `yaml`, and `yml`.
Exclude file types in the search path. Available file types are `csv`, `env`, `hcl`, `hocon`, `ini`, `json`, `plist`, `properties`, `toml`, `xml`, `yaml`, and `yml`

```
validator --exclude-file-types=json /path/to/search
Expand All @@ -164,7 +171,7 @@ validator --exclude-file-types=json /path/to/search
![Exclude File Types Run](./img/exclude_file_types.png)

#### Customize recursion depth
By default there is no recursion limit. If desired, the recursion depth can be set to an integer value. If depth is set to `0` recursion will be disabled and only the files in the search path will be validated.
By default there is no recursion limit. If desired, the recursion depth can be set to an integer value. If depth is set to `0` recursion will be disabled and only the files in the search path will be validated.

```
validator --depth=0 /path/to/search
Expand All @@ -173,18 +180,47 @@ validator --depth=0 /path/to/search
![Custom Recursion Run](./img/custom_recursion.png)

#### Customize report output
Customize the report output. Available options are `standard` and `json`
Customize the report output. Available options are `standard`, `junit`, and `json`

```
validator --reporter=json /path/to/search
```

![Exclude File Types Run](./img/custom_reporter.png)

### Group report output
Group the report output by file type, directory, or pass-fail. Supports one or more groupings.

```
validator -groupby filetype
```

![Groupby File Type](./img/gb-filetype.png)

#### Multiple groups
```
validator -groupby directory,pass-fail
```

![Groupby File Type and Pass/Fail](./img/gb-filetype-and-pass-fail.png)

### Output results to a file
Output report results to a file (default name is `result.{extension}`). Must provide reporter flag with a supported extension format. Available options are `junit` and `json`. If an existing directory is provided, create a file named default name in the given directory. If a file name is provided, create a file named the given name at the current working directory.

```
validator --reporter=json --output=/path/to/dir
```

### Suppress output
Passing the `--quiet` flag suppresses all output to stdout. If there are invalid config files the validator tool will exit with 1. Any errors in execution such as an invalid path will still be displayed.

```
validator --quiet /path/to/search
```

#### Container Run
```
docker run -it --rm -v /path/to/config/files:/test config-file-validator:1.5.0 /test
docker run -it --rm -v /path/to/config/files:/test config-file-validator:1.6.0 /test
```

![Docker Standard Run](./img/docker_run.png)
Expand Down Expand Up @@ -254,7 +290,7 @@ cp .\validator.exe 'C:\Program Files\validator'
You can also use the provided Dockerfile to build the config file validator tool as a container

```
docker build . -t config-file-validator:v1.5.0
docker build . -t config-file-validator:v1.6.0
```

## Contributors
Expand All @@ -266,4 +302,4 @@ docker build . -t config-file-validator:v1.5.0
We welcome contributions! Please refer to our [contributing guide](/CONTRIBUTING.md)

## License
The Config File Validator is released under the [Apache 2.0](/LICENSE) License
The Config File Validator is released under the [Apache 2.0](/LICENSE) License

0 comments on commit 56a2715

Please sign in to comment.