PPROLint

Rule file

Every property of a rule file.

A rule file is a JSON object saved as <id>.rule.json. Unknown properties are errors, so a typo never silently disables part of a rule.

Editor support

A JSON Schema of the rule file is published at /schema/rule.json. Name it in the file's $schema property, and text editors that read JSON Schema (VS Code, JetBrains IDEs, Zed…) complete and check its properties, operators, scopes and field paths:

no-disabled-clips.rule.json
{
  "$schema": "https://pprolint.com/schema/rule.json",
  "formatVersion": 1,
  "id": "no-disabled-clips",
  "name": "Disabled clips",
  "description": "Reports disabled clips.",
  "category": "static",
  "scope": "clip",
  "severity": "warning",
  "checks": [
    {
      "condition": { "field": "clip.disabled", "operator": "equals", "value": true },
      "message": "Clip \"{clip.name}\" on {clip.track} is disabled."
    }
  ]
}

PPROLint ignores $schema, and the rule editor does not write it back. The schema cannot check everything, such as whether a field belongs to the rule's scope or an option is declared: a file it accepts can still fail to load, and the problems PPROLint lists are the ones that count.

Rule

PropertyRequiredTypeMeaning
$schemanostringThe URL of the JSON Schema, for text editors. Ignored by PPROLint.
formatVersionyes1Version of the format. Always 1.
idyesstringStable identifier: lower-case letters and digits in words joined by hyphens (^[a-z0-9]+(-[a-z0-9]+)*$). Never changes once the rule is in use.
nameyestextShort title, shown in the Rules settings.
descriptionyestextOne sentence: what the rule reports.
categoryyesstringstatic, local-consistency, global-consistency or project. See Categories.
scopeyesstringWhat the checks run against: sequence, track, clip, effect, marker, or the id of a computed scope. See Scopes.
severityyesstringinfo, warning or error.
optionsnoobjectConfigurable values, by name. See Option.
checksyesarrayAt least one check.
matchingnostringfirst (default): an item gets the diagnostic of the first check that holds. all: one diagnostic per check that holds.
labelsnoobjectWording chosen by a field's value, by name. See Label.
datanoobjectData attached to every diagnostic of the rule.

Check

PropertyRequiredTypeMeaning
conditionyesconditionWhen to report.
messageyesmessageWhat to say.
datanoobjectData merged over the rule's data.
scopenostringRuns this check on another scope than the rule's.
locationnofield pathA number field, in ticks: the diagnostic's position.

Guide: Checks.

Condition

One of:

ShapeHolds when
{ "field", "operator", "value"? }The comparison is true. See Operators.
{ "all": [condition, …] }Every condition holds.
{ "any": [condition, …] }At least one condition holds.
{ "not": condition }The condition does not hold.

A value is a literal (number, string, boolean, or a list for in / notIn, a pair for between) or a field reference { "field": "options.max" }. Guide: Conditions.

Option

PropertyRequiredMeaning
typeyesnumber, string, boolean, number[], string[] or json.
defaultyesA value of that type.
descriptionnoWhat the option changes.

Read as the field options.<name>. Guide: Options.

Label

PropertyRequiredMeaning
fieldyesThe field whose value picks the wording.
valuesyesA message per value, keyed by the value as text ("true" for a boolean).

Used as {labels.<name>} in messages. Guide: Labels.

Data entry

A field path ("clip.scale"), or a constant { "literal": value }. Guide: Data.

Texts

name and description are a string (English), or an object keyed by locale where en_US is required.

Messages

A message is a template with {field.path} placeholders, as a string (English) or an object keyed by locale with en_US required. Each template is a string, or plural forms: { "count": "<number field>", "one"?, "few"?, "many"?, "other" }. Guide: Messages.

Categories

CategoryThe rule…
staticinspects facts of one item: an offline clip, a disabled clip, a gap.
local-consistencycompares a clip with nearby clips.
global-consistencycompares a clip with a broader population of the sequence.
projectchecks requirements for the whole sequence: required tracks, markers or effects, sequence settings.

Rules are listed by category, then id.

On this page