rules repository

A-0950 Always follow naming conventions for application items.

Severity Warning Check + SQL-based Test Free

Reason

Application items should follow a consistent naming convention so they are easy to recognise in shared components and page logic.

Rename non-conforming items under Shared Components → Application Items and update all references.

Example

Non-Compliant Example

appItem APP_DEBUG (
    // ...
)
Issues
LineColumnMessage
19Application item APP_DEBUG does not match '^AI_.+$'.

Compliant Solution - ★★★★★

appItem AI_APP_DEBUG (
    // ...
)

Tests

Test SQL query

select aa.workspace || '.' || aa.alias || '.' || ai.item_name as identifier,
       'Application item ' || ai.item_name || ' of app ' || aa.alias || ' in ' 
       || aa.workspace || ' does not match '#ApexAppItemPattern#'.' as message
  from apex_application_items ai
  join apex_applications aa   
    on aa.application_id = ai.application_id
       and aa.workspace = ai.workspace
 where not regexp_like(ai.item_name, #ApexAppItemPattern#)
   and ai.workspace in (#ApexWorkspaces#)
   and (json_value(json_array(#ApexAppIds#), '$[0]') is null
        or json_exists(json_array(#ApexAppIds#), '$[*]?(@ == $id)' passing to_char(ai.application_id) as "id"))

Test results

IdentifierMessageMigration
WORKSPACE.CUSTOMERS.APP_DEBUGApplication item APP_DEBUG of app CUSTOMERS in WORKSPACE does not match '^AI_.+$'.-

Parameters

Use parameters to customize the rule to your needs.

ParameterDescriptionDefault Value
ApexAppIdsComma-separated list of APEX application IDs to check. If empty, all applications of the workspaces are checked.,
ApexAppItemPatternCase-sensitive regular expression pattern for APEX application items.^AI_.+$
ApexWorkspacesComma-separated List of APEX workspaces owning APEX applications to check.dblinter, dbl_gui

References