Skip to content
Arthur edited this page Feb 13, 2024 · 3 revisions

The internal method is declared but never used.

Unused methods can be confusing for the reader and can cost performance to the system. This rule is similar to rule AA0228 The method '{0}' is declared but never used..

Example

codeunit 50100 MyCodeunit
{
    internal procedure MyProcedure()
    begin
        // My Business Logic here 
    end;
}

internalsVisibleTo

When configuring the internalsVisibleTo property in the app.json file, the internals of the App become accessible as if they were public procedures, thereby this rule will not raise a diagnostic.

"internalsVisibleTo": [
  {
    "id": "1bd24efc-5912-4ded-b970-a57e9d02cb55",
    "publisher": "MyPublisher",
    "name": "App Name"
  }
]

Exceptions

The rules will skip internal procedures that have a single parameter of type ErrorInfo or Notification.