Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Jq Processor

Purpose

Validates JSON files using jq.

How It Works

Discovers .json files in the project (excluding common build tool directories), runs jq empty on each file, and records success in the cache. The empty filter validates JSON syntax without producing output — a non-zero exit code from jq fails the product.

This processor supports batch mode — multiple files are checked in a single jq invocation.

Source Files

  • Input: **/*.json
  • Output: none (linter)

Configuration

[processor.jq]
linter = "jq"                               # The jq command to run
args = []                                    # Additional arguments to pass to jq (after "empty")
extra_inputs = []                            # Additional files that trigger rebuilds when changed
KeyTypeDefaultDescription
linterstring"jq"The jq executable to run
argsstring[][]Extra arguments passed to jq (after the empty filter)
extra_inputsstring[][]Extra files whose changes trigger rebuilds