Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
744
stars
245
forks
source link
Disable AL0604 and AL0606 with pragma are not working #6700
1. Describe the bug
It is not possible to disable warning AL0604 and AL0606 if this should throw an error.
2. To Reproduce
Create this AL-File:
codeunit 50002 "Test"
{
Access = Internal;
TableNo = Item;
trigger OnRun()
var
Item: Record Item;
begin
#pragma warning disable AL0604,AL0606
Copy(Item);
with Item do begin
Description := Format(CurrentDateTime());
end;
end;
}
use this ruleset:
{
"name": "Our ruleset",
"description": "Some specific rules",
"rules": [
{
"id": "AL0604",
"action": "Error",
"justification": "Use of implicit 'with' will be removed in the future. Qualify with 'Rec.'."
},
{
"id": "AL0606",
"action": "Error",
"justification": "The 'with' statement is deprecated and will be removed for cloud development in a future release."
}
]
}
3. Expected behavior
It is possible to disable warning AL0604 and AL0606 for single objects.
4. Actual behavior
5. Versions:
AL Language: 7.3.486497
Visual Studio Code: 1.57.1
Business Central: 18.2.26217.26795
List of Visual Studio Code extensions that you have installed:
1. Describe the bug It is not possible to disable warning AL0604 and AL0606 if this should throw an error.
2. To Reproduce Create this AL-File:
use this ruleset:
3. Expected behavior It is possible to disable warning AL0604 and AL0606 for single objects.
4. Actual behavior
5. Versions: