you-must-conform

Crates.ioyou-must-conform
lib.rsyou-must-conform
version1.1.1
sourcesrc
created_at2022-04-04 23:52:25.963272
updated_at2022-04-06 21:30:43.668212
descriptionA command-line tool for enforcing YAML|JSON|TOML|text file contents.
homepage
repositoryhttps://github.com/aatifsyed/you-must-conform
max_upload_size
id562351
size71,363
Aatif Syed (aatifsyed)

documentation

https://docs.rs/you-must-conform

README

you-must-conform

crates-io docs-rs github

A command-line tool for enforcing YAML|JSON|TOML|text file contents.

Usage

# conform.yaml
config:
- file: Cargo.toml
  format: toml
  schema:                   # Ensure these nested keys are set
    package:
      edition: "2021"
- file: Cargo.lock
  exists: true              # Ensure this file exists
- file: src/lib.rs
  matches-regex: '(?m)^use' # Ensure this regex is matched in the file

include:                    # (Recursively) merge config from these urls
- https://example.com/another-conform.yaml

$ you-must-conform --help
you-must-conform 1.1.0
A command-line tool for enforcing YAML|JSON|TOML|text file contents.

USAGE:
    you-must-conform [OPTIONS] <--file <FILE>|--url <URL>>

OPTIONS:
    -c, --context <CONTEXT>    The folder to check against the config file [default: .]
    -f, --file <FILE>          The config file to check [default: conform.yaml]
    -h, --help                 Print help information
    -u, --url <URL>            A url to fetch the config file from instead
    -V, --version              Print version information

$ you-must-conform
Schema not matched in ./Cargo.toml:
    "package" is a required property
File ./Cargo.lock does not exist
File ./src/lib.rs does not match regex (?m)^use
Error: Found 3 problems

License: MIT

Commit count: 19

cargo fmt