diff --git a/src/Apps/W1/EmailLogging/app/src/permissions/EmailLoggingObj.PermissionSet.al b/src/Apps/W1/EmailLogging/app/src/permissions/EmailLoggingObj.PermissionSet.al index af5d105db9b..e79de15d1e7 100644 --- a/src/Apps/W1/EmailLogging/app/src/permissions/EmailLoggingObj.PermissionSet.al +++ b/src/Apps/W1/EmailLogging/app/src/permissions/EmailLoggingObj.PermissionSet.al @@ -17,6 +17,7 @@ permissionset 1680 "Email Logging - Obj." codeunit "Email Logging API Client" = X, codeunit "Email Logging API Helper" = X, codeunit "Email Logging Message" = X, + codeunit "Email Logging Install" = X, codeunit "Email Logging Upgrade" = X, page "Email Logging Setup" = X, page "Email Logging Setup Wizard" = X, diff --git a/src/Layers/APAC/BaseApp/eServices/EDocument/IncomingDocument.Page.al b/src/Layers/APAC/BaseApp/eServices/EDocument/IncomingDocument.Page.al index ce89ab180ba..3a1800a7fdf 100644 --- a/src/Layers/APAC/BaseApp/eServices/EDocument/IncomingDocument.Page.al +++ b/src/Layers/APAC/BaseApp/eServices/EDocument/IncomingDocument.Page.al @@ -1164,10 +1164,12 @@ page 189 "Incoming Document" ReplaceMainAttachmentEnabled := Rec.CanReplaceMainAttachment(); end; +#pragma warning disable AL0547 // Accepted violation: turning off global variable access is a breaking change for existing subscribers of this published event. [IntegrationEvent(true, true)] local procedure OnCloseIncomingDocumentFromAction(var IncomingDocument: Record "Incoming Document") begin end; +#pragma warning restore AL0547 local procedure VerifyCanBeSentToOCR(): Boolean begin diff --git a/src/Layers/ES/BaseApp/Finance/FinancialReports/AccountScheduleNames.Page.al b/src/Layers/ES/BaseApp/Finance/FinancialReports/AccountScheduleNames.Page.al index eb90f118a08..a094c2c2391 100644 --- a/src/Layers/ES/BaseApp/Finance/FinancialReports/AccountScheduleNames.Page.al +++ b/src/Layers/ES/BaseApp/Finance/FinancialReports/AccountScheduleNames.Page.al @@ -155,7 +155,6 @@ page 103 "Account Schedule Names" { Caption = 'F&unctions'; Image = "Action"; - Visible = false; action("Export Schedules to ASC format") { ApplicationArea = Basic, Suite; diff --git a/src/Layers/NL/Tests/TestLibraries/NLXMLReadHelper.Codeunit.al b/src/Layers/NL/Tests/TestLibraries/NLXMLReadHelper.Codeunit.al index 4a17472fe59..c225827438d 100644 --- a/src/Layers/NL/Tests/TestLibraries/NLXMLReadHelper.Codeunit.al +++ b/src/Layers/NL/Tests/TestLibraries/NLXMLReadHelper.Codeunit.al @@ -46,7 +46,9 @@ codeunit 143001 "NL XML Read Helper" var Node: DotNet XmlNode; begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror GetNodeByElementName(ElementName, Node); + #pragma warning restore AS0058, PTE0007 Assert.ExpectedError('Element is missing!'); end; @@ -66,7 +68,9 @@ codeunit 143001 "NL XML Read Helper" var Attribute: DotNet XmlAttribute; begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror GetAttributeFromElement(ElementName, AttributeName, Attribute); + #pragma warning restore AS0058, PTE0007 Assert.ExpectedError('Attribute is missing!'); end; diff --git a/src/Layers/NO/Tests/TestLibraries/NOXMLReadHelper.Codeunit.al b/src/Layers/NO/Tests/TestLibraries/NOXMLReadHelper.Codeunit.al index a6636f037fb..165a6283079 100644 --- a/src/Layers/NO/Tests/TestLibraries/NOXMLReadHelper.Codeunit.al +++ b/src/Layers/NO/Tests/TestLibraries/NOXMLReadHelper.Codeunit.al @@ -47,7 +47,9 @@ codeunit 143001 "NO XML Read Helper" var Node: DotNet XmlNode; begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror GetNodeByElementName(ElementName, Node); + #pragma warning restore AS0058, PTE0007 Assert.ExpectedError(StrSubstNo(MissingElementErr, ElementName)); end; @@ -87,7 +89,9 @@ codeunit 143001 "NO XML Read Helper" var Attribute: DotNet XmlAttribute; begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror GetAttributeFromElement(ElementName, AttributeName, Attribute); + #pragma warning restore AS0058, PTE0007 Assert.ExpectedError('Attribute is missing!'); end; diff --git a/src/Layers/W1/BaseApp/System/Workflow/WorkflowWebhookNotification.Codeunit.al b/src/Layers/W1/BaseApp/System/Workflow/WorkflowWebhookNotification.Codeunit.al index e68fa41dc15..196984fd268 100644 --- a/src/Layers/W1/BaseApp/System/Workflow/WorkflowWebhookNotification.Codeunit.al +++ b/src/Layers/W1/BaseApp/System/Workflow/WorkflowWebhookNotification.Codeunit.al @@ -115,12 +115,14 @@ codeunit 1545 "Workflow Webhook Notification" end; end; +#pragma warning disable AL0547 // Accepted violation: turning off global variable access is a breaking change for existing subscribers of this published event. [TryFunction] [IntegrationEvent(true, true)] [Scope('OnPrem')] procedure OnPostNotificationRequest(DataID: Guid; WorkflowStepInstanceID: Guid; NotificationUrl: Text; RequestedByUserEmail: Text) begin end; +#pragma warning restore AL0547 [EventSubscriber(ObjectType::Codeunit, Codeunit::"Workflow Webhook Notification", 'OnPostNotificationRequest', '', false, false)] [TryFunction] diff --git a/src/Layers/W1/BaseApp/eServices/EDocument/IncomingDocument.Page.al b/src/Layers/W1/BaseApp/eServices/EDocument/IncomingDocument.Page.al index 2e81a4af12f..1c198d8524d 100644 --- a/src/Layers/W1/BaseApp/eServices/EDocument/IncomingDocument.Page.al +++ b/src/Layers/W1/BaseApp/eServices/EDocument/IncomingDocument.Page.al @@ -1163,10 +1163,12 @@ page 189 "Incoming Document" ReplaceMainAttachmentEnabled := Rec.CanReplaceMainAttachment(); end; +#pragma warning disable AL0547 // Accepted violation: turning off global variable access is a breaking change for existing subscribers of this published event. [IntegrationEvent(true, true)] local procedure OnCloseIncomingDocumentFromAction(var IncomingDocument: Record "Incoming Document") begin end; +#pragma warning restore AL0547 local procedure VerifyCanBeSentToOCR(): Boolean begin diff --git a/src/Layers/W1/BaseApp/eServices/EDocument/IncomingDocuments.Page.al b/src/Layers/W1/BaseApp/eServices/EDocument/IncomingDocuments.Page.al index 699ee8d3464..b9fc9de1ab8 100644 --- a/src/Layers/W1/BaseApp/eServices/EDocument/IncomingDocuments.Page.al +++ b/src/Layers/W1/BaseApp/eServices/EDocument/IncomingDocuments.Page.al @@ -903,10 +903,12 @@ page 190 "Incoming Documents" AutomaticCreationActionsAreEnabled := Rec."Data Exchange Type" <> ''; end; +#pragma warning disable AL0547 // Accepted violation: turning off global variable access is a breaking change for existing subscribers of this published event. [IntegrationEvent(true, true)] local procedure OnCloseIncomingDocumentsFromActions(var IncomingDocument: Record "Incoming Document") begin end; +#pragma warning restore AL0547 local procedure SetProcessedDocumentsVisibility(ShowProcessedItems: Boolean) begin diff --git a/src/Layers/W1/Tests/ApplicationTestLibrary/LibraryAssembly.Codeunit.al b/src/Layers/W1/Tests/ApplicationTestLibrary/LibraryAssembly.Codeunit.al index ff514d17f63..c0f1a7a9ab9 100644 --- a/src/Layers/W1/Tests/ApplicationTestLibrary/LibraryAssembly.Codeunit.al +++ b/src/Layers/W1/Tests/ApplicationTestLibrary/LibraryAssembly.Codeunit.al @@ -234,7 +234,9 @@ codeunit 132207 "Library - Assembly" if ExpectedError = '' then BatchPostAssemblyOrders.RunModal() else begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror BatchPostAssemblyOrders.RunModal(); + #pragma warning restore AS0058, PTE0007 Assert.IsTrue(StrPos(GetLastErrorText, ExpectedError) > 0, 'Actual:' + GetLastErrorText); ClearLastError(); end; @@ -1506,7 +1508,9 @@ codeunit 132207 "Library - Assembly" if ExpectedError = '' then AssemblyPost.Run(AssemblyHeader) else begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror AssemblyPost.Run(AssemblyHeader); + #pragma warning restore AS0058, PTE0007 Assert.IsTrue(StrPos(GetLastErrorText, ExpectedError) > 0, 'Expected:' + ExpectedError + '. Actual:' + GetLastErrorText); ClearLastError(); @@ -1742,7 +1746,9 @@ codeunit 132207 "Library - Assembly" if ExpectedError = '' then AsmPostCtrl.Undo(PostedAssemblyHeader, RestoreAO) else begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror AsmPostCtrl.Undo(PostedAssemblyHeader, RestoreAO); + #pragma warning restore AS0058, PTE0007 Assert.IsTrue(StrPos(GetLastErrorText, ExpectedError) > 0, 'Actual:' + GetLastErrorText); ClearLastError(); end; @@ -1754,7 +1760,9 @@ codeunit 132207 "Library - Assembly" begin Commit(); if AssemblyHeader.Quantity = 0 then begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror AssemblyHeader.UpdateUnitCost(); + #pragma warning restore AS0058, PTE0007 Assert.AreEqual( StrSubstNo(ErrorZeroQty, AssemblyHeader."No."), GetLastErrorText, 'Actual:' + GetLastErrorText + '; Expected:' + StrSubstNo(ErrorZeroQty, AssemblyHeader."No.")); @@ -1766,7 +1774,9 @@ codeunit 132207 "Library - Assembly" if Item."Costing Method" <> Item."Costing Method"::Standard then AssemblyHeader.UpdateUnitCost() else begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror AssemblyHeader.UpdateUnitCost(); + #pragma warning restore AS0058, PTE0007 Assert.IsTrue(StrPos(GetLastErrorText, ErrorStdCost) > 0, 'Actual:' + GetLastErrorText + '; Expected:' + ErrorStdCost); ClearLastError(); end; diff --git a/src/Layers/W1/Tests/TestLibraries/LibraryCRMIntegration.Codeunit.al b/src/Layers/W1/Tests/TestLibraries/LibraryCRMIntegration.Codeunit.al index 61fde7de917..456fb676627 100644 --- a/src/Layers/W1/Tests/TestLibraries/LibraryCRMIntegration.Codeunit.al +++ b/src/Layers/W1/Tests/TestLibraries/LibraryCRMIntegration.Codeunit.al @@ -1919,7 +1919,9 @@ codeunit 139164 "Library - CRM Integration" JobQueueEntryID := JobQueueEntry.ID; JobQueueEntry.SetStatus(JobQueueEntry.Status::Ready); if HandleError then begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror LibraryJobQueue.RunJobQueueDispatcher(JobQueueEntry); + #pragma warning restore AS0058, PTE0007 LibraryJobQueue.RunJobQueueErrorHandler(JobQueueEntry); end else LibraryJobQueue.RunJobQueueDispatcher(JobQueueEntry); diff --git a/src/Layers/W1/Tests/TestLibraries/LibraryJobQueue.Codeunit.al b/src/Layers/W1/Tests/TestLibraries/LibraryJobQueue.Codeunit.al index 1410b16b957..a6cf958909e 100644 --- a/src/Layers/W1/Tests/TestLibraries/LibraryJobQueue.Codeunit.al +++ b/src/Layers/W1/Tests/TestLibraries/LibraryJobQueue.Codeunit.al @@ -71,7 +71,9 @@ codeunit 132458 "Library - Job Queue" JobQueueEntry.Status := JobQueueEntry.Status::Ready; JobQueueEntry.Modify(); if WithErrorHandler then begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror RunJobQueueDispatcher(JobQueueEntry); + #pragma warning restore AS0058, PTE0007 RunJobQueueErrorHandler(JobQueueEntry); end else diff --git a/src/Layers/W1/Tests/TestLibraries/LibraryPermissionsVerify.Codeunit.al b/src/Layers/W1/Tests/TestLibraries/LibraryPermissionsVerify.Codeunit.al index 542648c927d..d541299372a 100644 --- a/src/Layers/W1/Tests/TestLibraries/LibraryPermissionsVerify.Codeunit.al +++ b/src/Layers/W1/Tests/TestLibraries/LibraryPermissionsVerify.Codeunit.al @@ -101,7 +101,9 @@ codeunit 132216 "Library - Permissions Verify" RecordRef: RecordRef; begin RecordRef.Open(TableNo); + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror RecordRef.FindFirst(); + #pragma warning restore AS0058, PTE0007 Assert.ExpectedError(StrSubstNo(MissingPermissionErr, Format(RecordRef.Caption))) end; @@ -116,10 +118,14 @@ codeunit 132216 "Library - Permissions Verify" begin RecordRef.Init(); + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror RecordRef.Insert(true); + #pragma warning restore AS0058, PTE0007 Assert.IsFalse(RecordRef.WritePermission, StrSubstNo(SupplementalPermissionErr, 'Insert', Format(RecordRef.Caption))); + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror RecordRef.Delete(true); + #pragma warning restore AS0058, PTE0007 Assert.IsFalse(RecordRef.WritePermission, StrSubstNo(SupplementalPermissionErr, 'Delete', Format(RecordRef.Caption))); end; } diff --git a/src/Layers/W1/Tests/TestLibraries/LibraryPostPrevHandler.Codeunit.al b/src/Layers/W1/Tests/TestLibraries/LibraryPostPrevHandler.Codeunit.al index 59ac128a576..75f26c07201 100644 --- a/src/Layers/W1/Tests/TestLibraries/LibraryPostPrevHandler.Codeunit.al +++ b/src/Layers/W1/Tests/TestLibraries/LibraryPostPrevHandler.Codeunit.al @@ -65,9 +65,13 @@ codeunit 131011 "Library - Post. Prev. Handler" InsertRecord(RecVar); Assert.IsTrue(GenJnlPostPreview.IsActive(), 'GenJnlPostPreview.IsActive'); if InvokeCommit then + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror Commit() + #pragma warning restore AS0058, PTE0007 else + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror GenJnlPostPreview.ThrowError(); + #pragma warning restore AS0058, PTE0007 Result := false; end; } diff --git a/src/Layers/W1/Tests/TestLibraries/LibraryXMLRead.Codeunit.al b/src/Layers/W1/Tests/TestLibraries/LibraryXMLRead.Codeunit.al index d5da056d2bd..1cbcee62ee3 100644 --- a/src/Layers/W1/Tests/TestLibraries/LibraryXMLRead.Codeunit.al +++ b/src/Layers/W1/Tests/TestLibraries/LibraryXMLRead.Codeunit.al @@ -214,7 +214,9 @@ codeunit 131335 "Library - XML Read" [RunOnClient] XMLNode: DotNet XmlNode; begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror GetNodeByElementName(NodeName, XMLNode); + #pragma warning restore AS0058, PTE0007 Assert.ExpectedErrorCode('Dialog'); Assert.ExpectedError(StrSubstNo(MissingElementErr, NodeName)); end; @@ -224,7 +226,9 @@ codeunit 131335 "Library - XML Read" [RunOnClient] Node: DotNet XmlNode; begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror LocateNodeInSubtree(Node, RootNodeName, NodeName, '', NodeMatchCriteria::FindByName); + #pragma warning restore AS0058, PTE0007 Assert.ExpectedErrorCode('Dialog'); Assert.ExpectedError(StrSubstNo(NotFoundAnyInSubtreeErr, NodeName, RootNodeName)); end; @@ -234,7 +238,9 @@ codeunit 131335 "Library - XML Read" [RunOnClient] Node: DotNet XmlNode; begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror LocateNodeInSubtree(Node, RootNodeName, NodeName, '', NodeMatchCriteria::FindByName); + #pragma warning restore AS0058, PTE0007 Assert.ExpectedErrorCode('Dialog'); Assert.ExpectedError(StrSubstNo(MissingElementErr, NodeName)); end; @@ -261,7 +267,9 @@ codeunit 131335 "Library - XML Read" procedure VerifyAttributeAbsenceInSubtree(RootNodeName: Text; NodeName: Text; AttributeName: Text) begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror GetAttributeValueInSubtree(RootNodeName, NodeName, AttributeName); + #pragma warning restore AS0058, PTE0007 Assert.ExpectedErrorCode('Dialog'); Assert.ExpectedError(StrSubstNo(AttributeNotFoundErr, NodeName, RootNodeName, AttributeName)); end; diff --git a/src/Layers/W1/Tests/TestLibraries/LibraryXMLReadOnServer.Codeunit.al b/src/Layers/W1/Tests/TestLibraries/LibraryXMLReadOnServer.Codeunit.al index 926471fc101..ee6b4fb3a9f 100644 --- a/src/Layers/W1/Tests/TestLibraries/LibraryXMLReadOnServer.Codeunit.al +++ b/src/Layers/W1/Tests/TestLibraries/LibraryXMLReadOnServer.Codeunit.al @@ -218,7 +218,9 @@ codeunit 131341 "Library - XML Read OnServer" var XMLNode: DotNet XmlNode; begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror GetNodeByElementName(NodeName, XMLNode); + #pragma warning restore AS0058, PTE0007 Assert.ExpectedErrorCode('Dialog'); Assert.ExpectedError(StrSubstNo(MissingElementErr, NodeName)); end; @@ -228,7 +230,9 @@ codeunit 131341 "Library - XML Read OnServer" var Node: DotNet XmlNode; begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror LocateNodeInSubtree(Node, RootNodeName, NodeName, '', NodeMatchCriteria::FindByName); + #pragma warning restore AS0058, PTE0007 Assert.ExpectedErrorCode('Dialog'); Assert.ExpectedError(StrSubstNo(NotFoundAnyInSubtreeErr, NodeName, RootNodeName)); end; @@ -238,7 +242,9 @@ codeunit 131341 "Library - XML Read OnServer" var Node: DotNet XmlNode; begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror LocateNodeInSubtree(Node, RootNodeName, NodeName, '', NodeMatchCriteria::FindByName); + #pragma warning restore AS0058, PTE0007 Assert.ExpectedErrorCode('Dialog'); Assert.ExpectedError(StrSubstNo(MissingElementErr, NodeName)); end; @@ -273,7 +279,9 @@ codeunit 131341 "Library - XML Read OnServer" [Scope('OnPrem')] procedure VerifyAttributeAbsenceInSubtree(RootNodeName: Text; NodeName: Text; AttributeName: Text) begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror GetAttributeValueInSubtree(RootNodeName, NodeName, AttributeName); + #pragma warning restore AS0058, PTE0007 Assert.ExpectedErrorCode('Dialog'); Assert.ExpectedError(StrSubstNo(AttributeNotFoundErr, NodeName, RootNodeName, AttributeName)); end; diff --git a/src/Layers/W1/Tests/TestLibraries/LibraryXPathXMLReader.Codeunit.al b/src/Layers/W1/Tests/TestLibraries/LibraryXPathXMLReader.Codeunit.al index 7d5c9bf4097..48fe4bebb41 100644 --- a/src/Layers/W1/Tests/TestLibraries/LibraryXPathXMLReader.Codeunit.al +++ b/src/Layers/W1/Tests/TestLibraries/LibraryXPathXMLReader.Codeunit.al @@ -227,7 +227,9 @@ codeunit 131337 "Library - XPath XML Reader" var Node: DotNet XmlNode; begin + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror GetNodeByElementName(ElementName, Node); + #pragma warning restore AS0058, PTE0007 Assert.ExpectedError('Element is missing!'); end; diff --git a/src/Layers/W1/Tests/TestLibraries/TestProxyNotificationMgt.Codeunit.al b/src/Layers/W1/Tests/TestLibraries/TestProxyNotificationMgt.Codeunit.al index fa5bb7a1661..a0b1eb35b46 100644 --- a/src/Layers/W1/Tests/TestLibraries/TestProxyNotificationMgt.Codeunit.al +++ b/src/Layers/W1/Tests/TestLibraries/TestProxyNotificationMgt.Codeunit.al @@ -69,7 +69,9 @@ codeunit 130231 "Test Proxy Notification Mgt." RemoveIgnoringNotifications(); IsSuccess := not HasNotificationContextEntries(); if not IsSuccess then + #pragma warning disable AS0058, PTE0007 // Accepted violation: this is a test library helper that intentionally wraps asserterror for use by test codeunits. asserterror Error(NotificationErr, GetFirstRecordIDText()); + #pragma warning restore AS0058, PTE0007 end; end; diff --git a/src/Layers/W1/Tests/TestRunner-Internal/SnapTestRunner.Codeunit.al b/src/Layers/W1/Tests/TestRunner-Internal/SnapTestRunner.Codeunit.al index ff004275b90..c1ee4e06498 100644 --- a/src/Layers/W1/Tests/TestRunner-Internal/SnapTestRunner.Codeunit.al +++ b/src/Layers/W1/Tests/TestRunner-Internal/SnapTestRunner.Codeunit.al @@ -101,6 +101,7 @@ codeunit 130200 "Snap Test Runner" // File operations are not atomic, so this may still go wrong. Commit(); +#pragma warning disable AS0058, PTE0007 // Accepted violation: this test runner intentionally uses asserterror to detect whether the lock was acquired. asserterror begin LockFile.Create(LockFileName); @@ -113,6 +114,7 @@ codeunit 130200 "Snap Test Runner" LockFile.Close(); Error('Acquired') end; +#pragma warning restore AS0058, PTE0007 // If we did not acquire the lock, we assume somebody else did and return false. Acquired := GetLastErrorText = 'Acquired'; @@ -287,7 +289,9 @@ codeunit 130200 "Snap Test Runner" if (FName <> '') and (FName <> 'OnRun') then begin PermissionErrors := PermissionTestCatalog.GetPermissionErrors(FTestPermissions); if Success and (PermissionErrors <> '') then begin +#pragma warning disable AS0058, PTE0007 // Accepted violation: this test runner intentionally uses asserterror to surface permission errors as a test failure. asserterror Error(PermissionErrors); +#pragma warning restore AS0058, PTE0007 Success := false; end; end; diff --git a/src/Layers/W1/Tests/TestRunner-Internal/TestRunner.Codeunit.al b/src/Layers/W1/Tests/TestRunner-Internal/TestRunner.Codeunit.al index 8e224354826..5a86acb2b88 100644 --- a/src/Layers/W1/Tests/TestRunner-Internal/TestRunner.Codeunit.al +++ b/src/Layers/W1/Tests/TestRunner-Internal/TestRunner.Codeunit.al @@ -190,7 +190,9 @@ codeunit 130020 "Test Runner" // todo: move to subscribers PermissionErrors := PermissionTestCatalog.GetPermissionErrors(FunctionTestPermissions); if IsSuccess and (PermissionErrors <> '') then begin // Only show permission errors once everything else succeeds +#pragma warning disable AS0058, PTE0007 // Accepted violation: this test runner intentionally uses asserterror to surface permission errors as a test failure. asserterror Error(PermissionErrors); +#pragma warning restore AS0058, PTE0007 IsSuccess := false; end; diff --git a/src/rulesets/base.ruleset.json b/src/rulesets/base.ruleset.json index 73cde226c39..a72ff7a83c0 100644 --- a/src/rulesets/base.ruleset.json +++ b/src/rulesets/base.ruleset.json @@ -23,14 +23,6 @@ "action": "None", "justification": "Use pragma to remove obsolete warning." }, - { - "id": "AL0523", - "action": "Warning" - }, - { - "id": "AL0547", - "action": "Warning" - }, { "id": "AL0589", "action": "Warning" @@ -117,12 +109,7 @@ { "id": "AS0052", "action": "Warning", - "justification": "The property 'url' must be set to a valid URL." - }, - { - "id": "AS0058", - "action": "Warning", - "justification": "Only use AssertError in Test Codeunits." + "justification": "The manifest property 'url' must be specified and contain a valid URL." }, { "id": "AS0062", @@ -382,11 +369,6 @@ "action": "Warning", "justification": "Group 'Processing' only contains promoted actions that are not set to PromotedOnly='true'." }, - { - "id": "AW0014", - "action": "Warning", - "justification": "The group defined in Page should not be hidden because it contains the target actions for some ActionRefs." - }, { "id": "PTE0002", "action": "None", @@ -397,11 +379,6 @@ "action": "Warning", "justification": "Table is missing a matching permission set." }, - { - "id": "PTE0007", - "action": "Warning", - "justification": "Only use AssertError in Test Codeunits." - }, { "id": "PTE0008", "action": "Warning", @@ -424,19 +401,19 @@ "action": "Warning" }, { - "id": "AL0604", + "id": "AL0523", "action": "Warning" }, { - "id": "AL0607", + "id": "AL0604", "action": "Warning" }, { - "id": "AL0611", + "id": "AL0607", "action": "Warning" }, { - "id": "AL0679", + "id": "AL0611", "action": "Warning" }, {