Skip to content

VIEW006: excessive-context-data

Oversized data stored in view-level custom properties

Code VIEW006
Name excessive-context-data
Category View structure (VIEW)
Default severity warning
Enabled by default yes
Fix available no
ign-lint equivalent ExcessiveContextDataRule

Measures the data stored in the view's custom object and reports:

  • arrays with more than max-array-size items;
  • objects (including custom itself) with more than max-sibling-properties members;
  • nesting deeper than max-nesting-depth levels (one finding, at the first deepest value);
  • more than max-data-points values in total;
  • strings longer than max-value-length characters.

Counting follows ign-lint: values are the leaves of the JSON tree (an empty object or array that is a member counts as one value), array indexes do not add nesting levels, a Java date object ({"$": ["ts", ...], "$ts": ...}) is one value.

Data pasted into a view (lookup tables, query results captured by the Designer) is sent to every client that opens the view, bloats the resource and hides data that belongs in a database or a named query.

{"custom": {"machines": [{"id": 1}, {"id": 2}, "... 500 more ..."]}}

Use instead: a binding (query, tag) that loads the data at run time, or a named query.

  • max-array-size (default 50)
  • max-sibling-properties (default 50)
  • max-nesting-depth (default 5)
  • max-data-points (default 1000)
  • max-value-length (default 10000, in characters)

All limits are exclusive: exactly the limit is fine.

Equivalent of ExcessiveContextDataRule, same options and messages, with these corrections: the breadth of the top-level custom object is measured too, arrays nested inside arrays are measured, and arrays of empty objects are counted by their real length.

Set in [rules.VIEW006] of iglint.toml (or [tool.iglint.rules.VIEW006] in pyproject.toml).

Option Type Default Description
max-array-size integer 50 Largest allowed array.
max-sibling-properties integer 50 Largest allowed number of members of one object.
max-nesting-depth integer 5 Deepest allowed nesting.
max-data-points integer 1000 Largest allowed number of values in custom.
max-value-length integer 10000 Longest allowed string, in characters.

ign-lint kwargs in a rule_config.json: max_array_size -> max-array-size, max_sibling_properties -> max-sibling-properties, max_nesting_depth -> max-nesting-depth, max_data_points -> max-data-points, max_value_length -> max-value-length.


Generated from the rule metadata by iglint generate-docs; iglint rule VIEW006 prints the same page in the terminal. Source: docs/rules/VIEW006.md.