Apache License 2.0

项目介绍

Boeing/config-file-validator 是一个托管在 GitHub 上的开源项目,主要使用 Go 编写,采用 Apache License 2.0 许可证,目前获得 518 个 Star、119 次 Fork。

仓库全名
Boeing/config-file-validator
开源许可证
Apache License 2.0
Star 数
518
Fork 数
119
未关闭 Issue
22

README 摘要

Config File Validator cfv is a toolchain for configuration files. It catches syntax errors, schema violations, and formatting problems across your repo and fixes what it can. Single static binary. No runtime dependencies. Documentation Read the docs → Quick Start CLI Reference Configuration Formatting Schema Validation Go Library Install Winget, Scoop, MacPorts, binary downloads Winget: winget install…

完整内容见 GitHub 原始 README 或本页 。

常见问题

config-file-validator 用什么语言开发?

主要使用 Go 编写,采用 Apache License 2.0 许可证,目前有 518 个 Star。

config-file-validator 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 config-file-validator 的源码?

可以直接克隆仓库:git clone https://github.com/Boeing/config-file-validator.git,默认分支为 main;安装与运行步骤见仓库 README。

config-file-validator 最近还在维护吗?

仓库最近一次更新为 1 周前,当前有 22 个未关闭 Issue;Star 数为 518,可作为社区活跃度的参考。

关于

Cross-platform CLI tool to validate configuration files across 18 formats. Syntax and schema validation with JSON Schema, XSD, and SchemaStore integration. Written in Go.

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

语言占比

CSS
Dockerfile
Go
TypeScript

Release

README

Config File Validator logo

Config File Validator

Code Coverage OpenSSF Scorecard OpenSSF Best Practices Apache 2 License Awesome Go Go Reference Pipeline Status

cfv is a toolchain for configuration files. It catches syntax errors, schema violations, and formatting problems across your repo and fixes what it can. Single static binary. No runtime dependencies.

cfv validating config files

Documentation

Read the docs →

Install

brew install config-file-validator
go install github.com/Boeing/config-file-validator/v3/cmd/cfv@latest
Winget, Scoop, MacPorts, binary downloads
  • Winget: winget install Boeing.config-file-validator
  • Scoop: scoop install config-file-validator
  • MacPorts: sudo port install config-file-validator
  • Binaries: GitHub Releases

Usage

Validate syntax, enforce schemas, and check formatting:

cfv check .

Fix formatting, trailing commas, and type coercion:

cfv check --fix .

Preview formatting changes as a diff:

cfv format --diff .

Exits with code 1 if any file fails.

Supported Formats

Format Extensions Syntax Format Schema
JSON .json ✅ ✅ ✅
JSONC .jsonc ✅ ✅ ✅
YAML .yaml, .yml ✅ ✅ ✅
TOML .toml ✅ ✅ ✅
XML .xml ✅ ✅ ✅
TOON .toon ✅ — ✅
SARIF .sarif ✅ — ✅
HCL .hcl, .tf, .tfvars ✅ ✅ —
INI .ini ✅ ✅ —
Properties .properties ✅ ✅ —
ENV .env ✅ ✅ —
HOCON .hocon ✅ — —
CSV .csv ✅ — —
EDITORCONFIG .editorconfig ✅ — —
Justfile .just ✅ — —
KDL .kdl ✅ — —
CUE .cue ✅ — —
Apple PList XML .plist ✅ — —

Schema validation uses JSON Schema, XSD, and automatic SchemaStore lookup. Formatting reads your existing .prettierrc, taplo.toml, .yamlfmt, and .editorconfig files. See Formatting and Schema Validation.

CI

cfv check --reporter=junit:results.xml --schemastore .

Reporters: standard, json, junit, sarif, github. The github reporter emits workflow commands so errors appear as inline PR annotations.

A GitHub Action and pre-commit hook are also available.

Contributors

Config File Validator contributors

License

Apache 2.0

评论

暂无评论