Skip to content

False positive triggers of Rule AA0073 #8221

@DennisFranzmannGOB

Description

@DennisFranzmannGOB

1. Describe the bug
With BC 28/the latest preview AL Language the CodeCope AA0073 behaves diffrent. It now throws warnings when record variables do not have the Temp prefix if their source table have set the Property "TableType = Temporary".
Is that a tightening of the code cop rule or a bug ?

2. To Reproduce
Find a Table with Property TableType=Temporary e.g.
Define a procedure with a local record variable of that table without prefix Temp
Run al compile to trigger code cop

Option 1:

    procedure CodeCopTest()
    var
        PlanningParameters: Record "Planning Parameters"; // newly triggers AA0073
    begin
        // Do some stuff
    end;

Option 2:

    procedure CodeCopTest()
    var
         TempPlanningParameters: Record "Planning Parameters";  // Does not trigger AA0073
    begin
        // Do some stuff
    end;

3. Expected behavior
Until BC 27.5 there was no warning with variables defined like in Option 1 so Option 1 should not trigger AA0073 in BC 28 either

4. Actual behavior
Option 1 triggers a warning.

5. Versions:

  • AL Language: v16.3.2065053 (preview)
  • Visual Studio Code: 1.113.0
  • Business Central: 28
  • List of Visual Studio Code extensions that you have installed:
  • Operating System:
    • Windows
    • Linux
    • MacOS
      Internal work item: AB#629346

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions