Skip to content

pre-commit-ci/pre-commit-ci-config

Repository files navigation

build status pre-commit.ci status

pre-commit-ci-config

validation for pre-commit.ci configuration

installation

pip install pre-commit-ci-config

api

pre_commit_ci_config.SCHEMA

a cfgv schema.

the expected input to this schema is the loaded top-level pre-commit configuration.

>>> import cfgv
>>> from pre_commit.clientlib import load_config
>>> from pre_commit_ci_config import SCHEMA
>>> cfg = load_config('.pre-commit-config.yaml')
>>> cfg = cfgv.validate(cfg, SCHEMA)
>>> cfg = cfgv.apply_defaults(cfg, SCHEMA)

check-pre-commit-ci-config

a commandline tool to validate the configuration

$ check-pre-commit-ci-config .pre-commit-config.yaml
$

as a pre-commit hook

See pre-commit for instructions

Sample .pre-commit-config.yaml:

-   repo: https://github.com/pre-commit-ci/pre-commit-ci-config
    rev: v1.6.1
    hooks:
    -   id: check-pre-commit-ci-config

About

validation for pre-commit.ci configuration

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages