{"id":13414110,"url":"https://github.com/Boeing/config-file-validator","last_synced_at":"2025-03-14T20:31:17.848Z","repository":{"id":64340949,"uuid":"574744365","full_name":"Boeing/config-file-validator","owner":"Boeing","description":"Cross Platform tool to validate configuration files","archived":false,"fork":false,"pushed_at":"2025-03-11T20:06:18.000Z","size":20092,"stargazers_count":368,"open_issues_count":34,"forks_count":72,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-11T21:20:26.691Z","etag":null,"topics":["cli","config","configuration-files","developer-tools","devops","files","go","golang","hacktoberfest","hacktoberfest-2024","hacktoberfest2024","ini","json","test-automation","testing","testing-tools","toml","validator","xml","yaml"],"latest_commit_sha":null,"homepage":"https://boeing.github.io/config-file-validator/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Boeing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-06T01:23:11.000Z","updated_at":"2025-03-11T20:06:15.000Z","dependencies_parsed_at":"2023-02-16T22:31:49.640Z","dependency_job_id":"dea4f5a6-f75f-4e0e-a505-f0357a8d7a5a","html_url":"https://github.com/Boeing/config-file-validator","commit_stats":{"total_commits":81,"total_committers":31,"mean_commits":"2.6129032258064515","dds":0.7160493827160495,"last_synced_commit":"720389142a8f5edbb8a8e27f5f84f9127ca34aa7"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Boeing%2Fconfig-file-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Boeing%2Fconfig-file-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Boeing%2Fconfig-file-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Boeing%2Fconfig-file-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Boeing","download_url":"https://codeload.github.com/Boeing/config-file-validator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243642131,"owners_count":20323964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","config","configuration-files","developer-tools","devops","files","go","golang","hacktoberfest","hacktoberfest-2024","hacktoberfest2024","ini","json","test-automation","testing","testing-tools","toml","validator","xml","yaml"],"created_at":"2024-07-30T20:01:57.957Z","updated_at":"2025-03-14T20:31:17.823Z","avatar_url":"https://github.com/Boeing.png","language":"Go","funding_links":[],"categories":["Go","公用事业公司","Utilities","Data Manipulation","\u003ca name=\"utility\"\u003e\u003c/a\u003eUtilities"],"sub_categories":["实用程序/Miscellaneous","Utility/Miscellaneous","YAML"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./img/logo.png\" width=\"200\" height=\"200\"/\u003e\n  \u003ch1\u003eConfig File Validator\u003c/h1\u003e\n  \u003cp\u003eSingle cross-platform CLI tool to validate different configuration file types\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg id=\"cov\" src=\"https://img.shields.io/badge/Coverage-94.6%25-brightgreen\" alt=\"Code Coverage\"\u003e\n\n  \u003ca href=\"https://scorecard.dev/viewer/?uri=github.com/Boeing/config-file-validator\"\u003e\n    \u003cimg src=\"https://api.scorecard.dev/projects/github.com/Boeing/config-file-validator/badge\" alt=\"OpenSSF Scorecard\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://www.bestpractices.dev/projects/9027\"\u003e\n    \u003cimg src=\"https://www.bestpractices.dev/projects/9027/badge\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://opensource.org/licenses/Apache-2.0\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/License-Apache_2.0-blue.svg\" alt=\"Apache 2 License\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/avelino/awesome-go\"\u003e\n  \u003cimg src=\"https://awesome.re/mentioned-badge.svg\" alt=\"Awesome Go\"\u003e\n  \u003c/a\u003e  \n\n  \u003ca href=\"https://pkg.go.dev/github.com/Boeing/config-file-validator\"\u003e\n  \u003cimg src=\"https://pkg.go.dev/badge/github.com/Boeing/config-file-validator.svg\" alt=\"Go Reference\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://goreportcard.com/report/github.com/Boeing/config-file-validator\"\u003e\n  \u003cimg src=\"https://goreportcard.com/badge/github.com/Boeing/config-file-validator\" alt=\"Go Report Card\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/boeing/config-file-validator/actions/workflows/go.yml\"\u003e\n  \u003cimg src=\"https://github.com/boeing/config-file-validator/actions/workflows/go.yml/badge.svg\" alt=\"Pipeline Status\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Supported config files formats:\n* Apple PList XML\n* CSV\n* EDITORCONFIG\n* ENV\n* HCL\n* HOCON\n* INI\n* JSON\n* Properties\n* TOML\n* XML\n* YAML\n\n## Demo\n\n\u003cimg src=\"./img/demo.gif\" alt=\"demo\" /\u003e\n\n## Installation\nThere are several ways to install the config file validator tool\n\n### Binary Releases\nDownload and unpack from https://github.com/Boeing/config-file-validator/releases\n\n### Aqua\nYou can install the validator using [aqua](https://aquaproj.github.io/).\n\n```\naqua g -i Boeing/config-file-validator\n```\n\n### Scoop\nYou can install the validator using [Scoop](https://scoop.sh/).\n\n```\nscoop install config-file-validator\n```\n\n### Arch Linux\nWe release an [AUR package](https://aur.archlinux.org/packages/config-file-validator) for the config-file-validator\n\n```\ngit clone https://aur.archlinux.org/config-file-validator.git\ncd config-file-validator\nmakepkg -si\n```\n\n### `go install`\nIf 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.\n\n```\ngo install github.com/Boeing/config-file-validator/cmd/validator@v1.8.0\n```\n\n## Usage\n```\nUsage: validator [OPTIONS] [\u003csearch_path\u003e...]\n\npositional arguments:\n    search_path: The search path on the filesystem for configuration files. Defaults to the current working directory if no search_path provided\n\noptional flags:\n  -depth int\n        Depth of recursion for the provided search paths. Set depth to 0 to disable recursive path traversal\n  -exclude-dirs string\n        Subdirectories to exclude when searching for configuration files\n  -exclude-file-types string\n        A comma separated list of file types to ignore\n  -globbing\n        If globbing flag is set, check for glob patterns in the arguments.\n  -groupby string\n        Group output by filetype, directory, pass-fail. Supported for Standard and JSON reports\n  -quiet\n        If quiet flag is set. It doesn't print any output to stdout.\n  -reporter value\n        A string representing report format and optional output file path separated by colon if present.\n        Usage: --reporter \u003cformat\u003e:\u003coptional_file_path\u003e\n        Multiple reporters can be specified: --reporter json:file_path.json --reporter junit:another_file_path.xml\n        Omit the file path to output to stdout: --reporter json or explicitly specify stdout using \"-\": --reporter json:-\n        Supported formats: standard, json, junit, and sarif (default: \"standard\")\n  -version\n        Version prints the release version of validator\n```\n\n### Environment Variables\n\nThe config-file-validator supports setting options via environment variables. If both command-line flags and environment variables are set, the command-line flags will take precedence. The supported environment variables are as follows:\n\n| Environment Variable | Equivalent Flag |\n|----------------------|-----------------|\n| `CFV_DEPTH`          | `-depth`        |\n| `CFV_EXCLUDE_DIRS`   | `-exclude-dirs` |\n| `CFV_EXCLUDE_FILE_TYPES` | `-exclude-file-types` |\n| `CFV_REPORTER`       | `-reporter`     |\n| `CFV_GROUPBY`        | `-groupby`      |\n| `CFV_QUIET`          | `-quiet`        |\n| `CFV_GLOBBING`          | `-globbing`  |\n\n### Examples\n#### Standard Run\nIf the search path is omitted it will search the current directory\n```\nvalidator /path/to/search\n```\n\n![Standard Run](./img/standard_run.gif)\n\n#### Multiple search paths\nMultiple search paths are supported, and the results will be merged into a single report\n```\nvalidator /path/to/search /another/path/to/search\n```\n\n![Multiple Search Paths Run](./img/multiple_paths.gif)\n\n#### Exclude directories\nExclude subdirectories in the search path\n\n```\nvalidator --exclude-dirs=/path/to/search/tests /path/to/search\n```\n\n![Exclude Dirs Run](./img/exclude_dirs.gif)\n\n#### Exclude file types\nExclude file types in the search path. Available file types are `csv`, `env`, `hcl`, `hocon`, `ini`, `json`, `plist`, `properties`, `toml`, `xml`, `yaml`, and `yml`\n\n```\nvalidator --exclude-file-types=json /path/to/search\n```\n\n![Exclude File Types Run](./img/exclude_file_types.gif)\n\n#### Customize recursion depth\nBy 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.\n\n```\nvalidator --depth=0 /path/to/search\n```\n\n![Custom Recursion Run](./img/custom_recursion.gif)\n\n#### Customize report output\nYou can customize the report output and save the results to a file (default name is result.{extension}). The available report types are `standard`, `junit`, `json`, and `sarif`. You can specify multiple report types by chaining the `--reporter` flags.\n\nYou can specify a path to an output file for any reporter by appending `:\u003cpath\u003e` the the name of the reporter. Providing an output file is optional and the results will be printed to stdout by default. To explicitly direct the output to stdout, use `:-` as the file path.\n\n```\nvalidator --reporter=json:- /path/to/search\nvalidator --reporter=json:output.json --reporter=standard /path/to/search\n```\n\n![Exclude File Types Run](./img/custom_reporter.gif)\n\n### Group report output\nGroup the report output by file type, directory, or pass-fail. Supports one or more groupings.\n\n```\nvalidator -groupby filetype\n```\n\n![Groupby File Type](./img/gb-filetype.gif)\n\n#### Multiple groups\n```\nvalidator -groupby directory,pass-fail\n```\n\n![Groupby File Type and Pass/Fail](./img/gb-filetype-and-pass-fail.gif)\n\n### Suppress output\nPassing 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.\n\n```\nvalidator --quiet /path/to/search\n```\n\n### Search files using a glob pattern\n\nUse the `-globbing` flag to validate files matching a specified pattern. Include the pattern as a positional argument in double quotes. Multiple glob patterns and direct file paths are supported. If invalid config files are detected, the validator tool exits with code 1, and errors (e.g., invalid patterns) are displayed.\n\n[Learn more about glob patterns](https://www.digitalocean.com/community/tools/glob)\n\n```\n# Validate all `.json` files in a directory\nvalidator -globbing \"/path/to/files/*.json\"\n\n# Recursively validate all `.json` files in subdirectories\nvalidator -globbing \"/path/to/files/**/*.json\"\n\n# Mix glob patterns and paths\nvalidator -globbing \"/path/*.json\" /path/to/search\n```\n\n## Build\nThe 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.\n\n### macOS\n#### Build\n```\nCGO_ENABLED=0 \\\nGOOS=darwin \\\nGOARCH=amd64 \\ # for Apple Silicon use arm64\ngo build \\\n-ldflags='-w -s -extldflags \"-static\"' \\\n-tags netgo \\\n-o validator \\\ncmd/validator/validator.go\n```\n\n#### Install\n```\ncp ./validator /usr/local/bin/\nchmod +x /usr/local/bin/validator\n```\n\n### Linux\n#### Build\n```\nCGO_ENABLED=0 \\\nGOOS=linux \\\nGOARCH=amd64 \\\ngo build \\\n-ldflags='-w -s -extldflags \"-static\"' \\\n-tags netgo \\\n-o validator \\\ncmd/validator/validator.go\n```\n\n#### Install\n```\ncp ./validator /usr/local/bin/\nchmod +x /usr/local/bin/validator\n```\n\n### Windows\n#### Build\n```\nCGO_ENABLED=0 \\\nGOOS=windows \\\nGOARCH=amd64 \\\ngo build \\\n-ldflags='-w -s -extldflags \"-static\"' \\\n-tags netgo \\\n-o validator.exe \\\ncmd/validator/validator.go\n```\n\n#### Install\n```powershell\nmkdir -p 'C:\\Program Files\\validator'\ncp .\\validator.exe 'C:\\Program Files\\validator'\n[Environment]::SetEnvironmentVariable(\"C:\\Program Files\\validator\", $env:Path, [System.EnvironmentVariableTarget]::Machine)\n```\n\n### Docker\nYou can also use the provided Dockerfile to build the config file validator tool as a container\n\n```\ndocker build . -t config-file-validator:v1.8.0\n```\n\n## Contributors\n\u003ca href=\"https://github.com/Boeing/config-file-validator/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=Boeing/config-file-validator\" /\u003e\n\u003c/a\u003e\n\n## Contributing\nWe welcome contributions! Please refer to our [contributing guide](./CONTRIBUTING.md)\n\n## License\nThe Config File Validator is released under the [Apache 2.0](./LICENSE) License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBoeing%2Fconfig-file-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBoeing%2Fconfig-file-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBoeing%2Fconfig-file-validator/lists"}