False positive triggers of Rule AA0073
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 881
- Forks
- 285
- Avg merge
- 3d 36m
- Merged PRs (30d)
- 1
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the warning with a temporary table and a local record variable named without the Temp prefix, using the BC 28 and AL Language versions listed. Compare the result with BC 27.5 and with the Temp-prefixed variable in the report. Done means the behavior is confirmed as intentional or Option 1 no longer produces a false AA0073 warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- compilers, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100