Skip to content

Commit

Permalink
README updates for v1.4.0 release (#37)
Browse files Browse the repository at this point in the history
* updating README for release 1.4.0

* updating splash page with changes
  • Loading branch information
kehoecj authored Sep 28, 2023
1 parent ed46ce0 commit ac4dc72
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 18 deletions.
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ positional arguments:
optional flags:
-exclude-dirs string
Subdirectories to exclude when searching for configuration files
-exclude-file-types string
A comma separated list of file types to ignore
-reporter string
Format of the printed report. Options are standard and json (default "standard")
```
Expand All @@ -77,17 +79,36 @@ validator /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 `ini`, `json`, `yaml`, `yml`, `toml`, and `xml`

```
validator --exclude-file-types=json /path/to/search
```

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

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

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

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


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

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

## Building from source
The project can be downloaded and built from source using an environment with golang 1.17+ installed. After successful build, the statically-linked binary can be moved to a location on your operating system PATH.
Expand Down
2 changes: 1 addition & 1 deletion cmd/validator/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func mainInit() int {
// Run the config file validation
exitStatus, err := cli.Run()
if err != nil {
log.Printf("An error occured during CLI execution: %v", err)
log.Printf("An error occurred during CLI execution: %v", err)
}

return exitStatus
Expand Down
Binary file added img/custom_reporter.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 modified img/docker_run.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 modified img/exclude_dirs.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/exclude_file_types.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 modified img/standard_run.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 33 additions & 14 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,24 +59,31 @@ If you have a go environment on your desktop you can use [go install](https://go
go install github.com/Boeing/config-file-validator/cmd/validator
```

### Binaries
Binary downloads are available for Linux, Windows, and MacOS. Navigate to the [releases](https://github.com/Boeing/config-file-validator/releases) page to download the latest version. Once the binary has been downloaded it needs to be installed by moving the downloaded file to a location on your OS PATH.

### Executables
The config-file-validator is built as a statically linked binary which can be downloaded and executed on your target system. Binaries are available for Linux, Windows, and MacOS. Navigate to the [releases](https://github.com/Boeing/config-file-validator/releases) page to download the latest version. Once the binary has been downloaded it needs to be installed by moving the downloaded file to a location on your operating system's PATH.

## Using
```
Usage of /validator:
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
optional flags:
-exclude-dirs string
Subdirectories to exclude when searching for configuration files
-search-path string
The search path for configuration files
-exclude-file-types string
A comma separated list of file types to ignore
-reporter string
Format of printed report. Currently supports standard (default) and json.
Format of the printed report. Options are standard and json (default "standard")
```

### Examples
#### Standard Run
If the search path is omitted it will search the current directory
```
validator -search-path /path/to/search
validator /path/to/search
```

![Standard Run](./img/standard_run.png)
Expand All @@ -85,24 +92,36 @@ validator -search-path /path/to/search
Exclude subdirectories in the search path

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

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

#### JSON Output
Output the results in JSON
#### Exclude file types
Exclude file types in the search path. Available file types are `ini`, `json`, `yaml`, `yml`, `toml`, and `xml`

```
validator --exclude-file-types=json /path/to/search
```

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

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

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

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


#### Container Run
```
docker run -it --rm -v /path/to/config/file/location:/test -search-path=/test
docker run -it --rm -v /path/to/config/files:/test config-file-validator:1.4.0 /test
```

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

## Building from source
The project can be downloaded and built from source using an environment with golang 1.17+ installed. After successful build, the statically-linked binary can be moved to a location on your operating system PATH.
Expand Down Expand Up @@ -157,4 +176,4 @@ docker build . -t config-file-validator
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 ac4dc72

Please sign in to comment.