Skip to content

CodeAnalyzer - rule "AA0072" ignores triggers and event subscriber #8272

Description

@DominicSaladin

Please include the following with each issue:

1. Describe the bug
The CodeCop rule AA0072 still doesn't behave correctly in certain scenarios like local variable in the OnAction trigger of pages.
There are two older issues for this which both have been closed without resolving the issue. One was marked as not planned because there was a plan to overhaul the analysers and the second one was marked as completed without a comment.
#7177
#6871

The issue #6871 describes a lot of scenarios where it doesn't trigger.

2. To Reproduce
Steps to reproduce the behavior:

  1. Add this action to a page
  2. See no information
actions
    {
        area(Navigation)
        {
            action(Test)
            {
                Caption = 'Test';

                trigger OnAction()
                var
                    Test: Record "User Setup"
                begin
                    Test.Get();
                end;
            }
        }
    }

3. Expected behavior
Show information of rule AA0072

4. Actual behavior
No information

5. Versions:

  • AL Language: 17.0.2273547
  • Visual Studio Code: 1.125.0-insider
  • List of Visual Studio Code extensions that you have installed:
    • ALCops
  • Operating System:
    • Windows
    • Linux
    • MacOS

Final Checklist

Please remember to do the following:

  • Search the issue repository to ensure you are reporting a new issue

  • Reproduce the issue after disabling all extensions except the AL Language extension

  • Simplify your code around the issue to better isolate the problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions