PPROLint

Conditions

Build the condition of a check from comparisons and groups — fields, operators, values, all / any / not.

The Report when row of a check is its condition: an item is reported when the condition holds for it. A condition is either one comparison, or a group of conditions.

Comparisons

A comparison is one row of three boxes that reads like a sentence: field, operator, value.

A comparison: clip.speed is greater than 2

The field

The first box is the value of the item that the comparison looks at. Its list holds every field of the check's scope, grouped by what it describes (sequence, track, clip…), then the rule's options. Each field has a short description under its name.

The field list: clip fields such as clip.duration, clip.speed, clip.disabled, each with a description

All the fields are listed in the Fields reference. Times are in ticks (254,016,000,000 per second) unless the field's name says frames, seconds or timecode: compare clip.durationFrames with a number of frames, not clip.duration.

Choosing another field keeps the operator and the value when they still fit its type, and resets them otherwise.

The operator

The second box lists the operators that fit the field's type.

The operators for a number field: is, is not, is greater than, is at least, is less than, is at most, is between, is one of, is not one of, is known, is unknown
OperatorFieldsHolds when the field…Rule file
isallequals the valueequals
is notalldiffers from the valuenotEquals
is greater thannumbersis more than the valuegreaterThan
is at leastnumbersis the value or moregreaterThanOrEqual
is less thannumbersis less than the valuelessThan
is at mostnumbersis the value or lesslessThanOrEqual
is betweennumbersis between two values, both includedbetween
is one ofnumbers, textsis one of a list of valuesin
is not one ofnumbers, textsis none of a list of valuesnotIn
containstextscontains the text (case matters)contains
does not containtextsdoes not contain the textnotContains
matchestextsmatches a regular expressionmatches
is knownallhas a valueexists
is unknownallhas no valuenotExists

Yes/no fields offer is, is not, is known and is unknown.

The value

The value box changes with the operator.

A single value (is, is greater than, contains…): type a number or a text. For a number field, the box only accepts a number; Infinity and -Infinity are accepted too (a silent audio clip has a volume of -Infinity dB).

Yes or No, for a yes/no field:

clip.reversed is No

Two values, for is between. Both bounds are included: 50 and 150 match 50 % and 150 %.

clip.scale is between 50 and 150

A list, for is one of and is not one of. Type a value and press Enter to add it; click the × of a value to remove it.

clip.source.extension is one of mov, mxf

A regular expression, for matches. ^TEMP matches names that start with TEMP; \d is a digit; $ is the end of the text. The editor reports an invalid expression.

clip.name matches ^TEMP

Nothing, for is known and is unknown.

clip.source.mediaPath is unknown

Compare with a field or an option

Instead of typing a value, you can compare with another field of the same item, or with one of the rule's options. Click the arrow of the value box: the list shows the fields and options of the same type. Pick one, and the comparison uses its value for each item.

The value list open: number fields, then an options group with options.maxSpeed

For is one of, the list offers the list options of the rule (a List of texts option for a text field).

Typing in the box again replaces the field with what you type.

Groups

To combine conditions, put them in a group. A group is a row with its kind and of the following, and its conditions indented under it.

All of the following: clip.speed is greater than options.maxSpeed, clip.disabled is No
GroupHolds whenRule file
All of the followingevery condition in it holds (and)all
Any of the followingat least one condition in it holds (or)any
Not the followingits one condition does not holdnot
The group kind list: All, Any, Not

Change a group's kind with its first box. Switching between All and Any keeps its conditions; switching to Not keeps the first one only.

Groups nest: an Any inside an All reads "this, and (that or that)". The built-in Tiny clips rule nests two:

All of: clip.duration is greater than 0, clip.durationFrames is less than options.minFrames, Any of (clip.trackType is video, options.includeAudio is Yes), Any of (clip.adjustmentLayer is No, options.includeAdjustmentLayers is Yes)

Add, wrap and remove

+ Add, under a condition or at the end of a group, adds to it:

The Add menu: Add condition, Add an all group, Add an any group, Add a not
  • Add condition: a new comparison.
  • Add an "all" group, Add an "any" group: a new group, with one comparison in it.
  • Add a "not": a comparison inside a Not.

When the condition is a single comparison, adding turns it into an All group holding the comparison and the new condition.

The … button at the end of each row has more:

The … menu of a group: Wrap in a group, Keep only its first condition
ActionWhat it does
Wrap in a groupPuts the row inside a new All group, to add conditions next to it. Change the group's kind afterwards if needed.
Keep only its first conditionReplaces a group with its first comparison.
Remove conditionRemoves the row, and everything in it for a group. The top condition of a check cannot be removed, only changed.

Unknown values

Some fields can have no value: an audio clip has no scale, a clip without media has no media path, an in point may not be set. The Fields reference marks these with a ? type.

A comparison on a field without a value is false, whatever the operator, except is known and is unknown. So clip.scale is less than 50 never reports an audio clip, and neither does clip.scale is not 100.

The trap: Not

Not turns a false comparison into true. Not clip.scale is 100 reports every audio clip, since they have no scale. Prefer positive comparisons (is less than the minimum, or is greater than the maximum) over Not is between, or add clip.scale is known to an All group.

In a rule file

A comparison is { "field", "operator", "value" }, and groups are { "all": [...] }, { "any": [...] } and { "not": ... }; the table above gives each operator's name. See Conditions and Operators.

On this page