diff --git a/docs/samples/generic_plot.kibot.yaml b/docs/samples/generic_plot.kibot.yaml index 2a924e490..63f44906a 100644 --- a/docs/samples/generic_plot.kibot.yaml +++ b/docs/samples/generic_plot.kibot.yaml @@ -28,6 +28,8 @@ preflight: annotate_power: true # [dict|list(dict)=[]] Checks to apply to the schematic fields. # You can define conditions that must be met by the fields. + # The checks are applied to every component in the schematic. + # When an error is hit execution is stopped. # One use is to check that all components are suitable for a temperature range. # In this case a field must declare the temperature range. check_fields: diff --git a/docs/source/configuration/sup_preflights.rst b/docs/source/configuration/sup_preflights.rst index 473319e99..e01e71d2c 100644 --- a/docs/source/configuration/sup_preflights.rst +++ b/docs/source/configuration/sup_preflights.rst @@ -33,20 +33,32 @@ Supported preflights - **check_fields** :index:`: ` [:ref:`dict ` | :ref:`list(dict) `] (default: ``[]``) Checks to apply to the schematic fields. You can define conditions that must be met by the fields. + The checks are applied to every component in the schematic. + When an error is hit execution is stopped. One use is to check that all components are suitable for a temperature range. In this case a field must declare the temperature range. - Valid keys: - **field** :index:`: ` [:ref:`string `] (default: ``''``) Name of field to check. - - **regex** :index:`: ` [:ref:`string `] (default: ``''``) Regular expression to match the field content. + - **regex** :index:`: ` [:ref:`string `] (default: ``''``) Regular expression to match the field content. Note that technically we do a search, not a match. - *regexp* :index:`: ` Alias for regex. - ``numeric_condition`` :index:`: ` [:ref:`string `] (default: ``'none'``) (choices: ">", ">=", "<", "<=", "=", "none") Convert the group 1 of the regular expression to a number and apply this operation to the *numeric_reference* value. - ``numeric_reference`` :index:`: ` [:ref:`number `] (default: ``0``) Value to compare using *numeric_condition*. - - ``severity`` :index:`: ` [:ref:`string `] (default: ``'error'``) (choices: "error", "warning", "info", "skip") If the regex matches what we do. + - ``severity`` :index:`: ` [:ref:`string `] (default: ``'error'``) (choices: "error", "warning", "info", "skip", "continue") Default severity applied to various situations. The *error* will stop execution. - - ``skip_if_missing`` :index:`: ` [:ref:`boolean `] (default: ``true``) If the field is missing we just continue. Otherwise we apply the *severity*. + The *warning* and *info* will generate a message and continue with the rest of the tests. + In the *skip* case we jump to the next component. + Use *continue* to just skip this test and apply the rest. + - ``severity_fail_condition`` :index:`: ` [:ref:`string `] (default: ``'default'``) (choices: "error", "warning", "info", "skip", "continue", "default") What to do when the *numeric_condition* isn't met. + Default means to use the *severity* option. + - ``severity_missing`` :index:`: ` [:ref:`string `] (default: ``'continue'``) (choices: "error", "warning", "info", "skip", "continue", "default") What to do if the field isn't defined. + Default means to use the *severity* option. + - ``severity_no_match`` :index:`: ` [:ref:`string `] (default: ``'default'``) (choices: "error", "warning", "info", "skip", "continue", "default") What to do when the regex doesn't match. + Default means to use the *severity* option. + - ``severity_no_number`` :index:`: ` [:ref:`string `] (default: ``'default'``) (choices: "error", "warning", "info", "skip", "continue", "default") What to do if we don't get a number for a *numeric_condition*. + Default means to use the *severity* option. - **check_zone_fills** :index:`: ` [:ref:`boolean `] Zones are filled before doing any operation involving PCB layers.