Skip to content

SpectralOps/spectral-pre-commit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

Spectral pre-commit Integration

This is a repo with Spectral hooks for pre-commit

Usage

To use Spectral you need an active Spectral account. If you don't have one yet, grab a free trial!

If you want to add Spectral to your Git pre-commit hooks and you're using pre-commit:

  1. Add the following to your .pre-commit-config.yaml:
    repos:
    -   repo: https://github.com/spectralops/spectral-pre-commit
        rev: master
        hooks:
        - id: spectral
  2. Run pre-commit install to install Spectral as a pre-commit hook for your repo.
  3. Make sure you have the spectral executable in your PATH.
  4. Make sure you have your Spectral DSN (spk-xxx) as an env var.

See spectralops/spectral-example-pre-commit for a live example.

About

Spectral pre-commit.com Hooks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published