blockwatch 0.6.0

Language agnostic linter that keeps your code and documentation in sync and valid
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
- id: blockwatch
  name: blockwatch
  description: Validate <block> rules on staged changes (pipes the staged diff into blockwatch).
  entry: bash -c 'set -o pipefail; git diff --cached --patch --unified=0 | blockwatch --diff --only-changed'
  language: rust
  pass_filenames: false
  stages: [ pre-commit ]

- id: blockwatch-commit-msg
  name: blockwatch (commit-msg)
  description: Validate <block> rules on staged changes, reading Blockwatch-suppress trailers from the commit message.
  # The trailing `--` is necessary: pre-commit appends the message file to this argv, and
  # `bash -c SCRIPT FILE` binds FILE to $0 rather than $1. The sentinel takes the $0 slot instead.
  entry: bash -c 'set -o pipefail; git diff --cached --patch --unified=0 | blockwatch --diff --only-changed --suppress-from "$1"' --
  language: rust
  pass_filenames: true
  stages: [ commit-msg ]