Field repository lookup lint rules (keyfields drift, dataset missing)
Two project-wide rules, OFF by default: lookup KeyFields drift from the repository, and a LOOKUP_DATASET no component declares.
Read this to see what the two lookup rules compare with the repository lookup rows and when they stay silent.
How to run it
drag-lint lint-all [--profile <name>] [--target-compiler <ver|auto>] [--db <file.sqlite>] [--project <.dproj>] [--build-config <name>] [--rule <id>[,<id>...]] [--disable id,...] [--output <report.txt>] [--json] [--labels] [--quiet] [--lint-third-party] [--no-preprocess] [--shared-db <db> ...] [--library-db none] [--no-budget] [--changed-since <rev>]
Example:
drag-lint lint-all --db <project.sqlite> --project <App.dproj> --rule repo-lookup-keyfields-drift
Full flag list: lint-all in the CLI reference.
drag-lint lint-all [--profile <name>] [--target-compiler <ver|auto>] [--db <file.sqlite>] [--project <.dproj>] [--build-config <name>] [--rule <id>[,<id>...]] [--disable id,...] [--output <report.txt>] [--json] [--labels] [--quiet] [--lint-third-party] [--no-preprocess] [--shared-db <db> ...] [--library-db none] [--no-budget] [--changed-since <rev>]
Example:
drag-lint lint-all --db <project.sqlite> --project <App.dproj> --rule repo-lookup-dataset-missing
Full flag list: lint-all in the CLI reference.
Where to click
No IDE surface: this feature runs from the CLI (see How to run it).
Details
Eight lint rules that compare a form with the field repository (.dlrepo). All are project-wide
(lint-all, lint-project), read the repository only, and are silent without a repository, for a
dataset whose table cannot be resolved, for an unknown table, and for a repository value of 0 or empty.
A finding the repository itself marks as an exception (DL_EXCEPTIONS) is not reported.
drag-lint lint-all --db <project.sqlite> --project <App.dproj> --rule repo-size-drift
DFM side (R1)
| Rule | ON | Reports |
|---|---|---|
repo-size-drift | yes | a string field or grid Properties.MaxLength that differs from the repository CHAR_LENGTH |
repo-caption-drift | no | a DisplayLabel or grid column Caption that differs from the repository label / DL_GRID_COLUMNS.CAPTION |
repo-grid-column-unknown-field | no | a grid column bound to a field the repository does not know for that table |
repo-persistent-field-unknown | no | a persistent field the repository does not know for that table |
repo-required-not-honoured | no | a NOT NULL column (no sequence, not an auto-increment field) whose persistent field is not Required |
repo-update-table-drift | no | a dataset UpdateTableName that differs from the table the repository recorded for it |
Lookup side (R2)
| Rule | ON | Reports |
|---|---|---|
repo-lookup-keyfields-drift | no | KeyFields / LookupKeyFields / LookupResultField that differ from SOURCEKEY / DESTKEY / DESTVALUE (one finding per property) |
repo-lookup-dataset-missing | no | a LOOKUP_DATASET that names no declared component (finding on the bound field's object line) |
Defaults come from the MEASURE-164 run on the ORM3 sources: only repo-size-drift is ON; the others
are OFF until their yield is measured. Enable one with rules enable --rule <id> or --enable <id>.
Limits: A7 stays silent when the repository lookup row has no bound DFM field; a lookup dataset created in
code reads as missing; the same component name on two forms counts as present; dm.x cross-module
bindings are not followed.