Ruleset hardening: promote 6 rules from Warning to Error - #10251
Draft
Jesper Schulz-Wedde (JesperSchulz) wants to merge 6 commits into
Draft
Ruleset hardening: promote 6 rules from Warning to Error#10251Jesper Schulz-Wedde (JesperSchulz) wants to merge 6 commits into
Jesper Schulz-Wedde (JesperSchulz) wants to merge 6 commits into
Conversation
AD0001 and AL0640 are overridden to Error in base.ruleset.json, which is already the effective severity: base.ruleset.json sets generalAction to Error, and neither rule is downgraded by the included ruleset.json. Removing the two entries is therefore a no-op for analysis behaviour and simply reduces the override list from 105 to 103. Related to AB#640773 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7e6fd312-fe92-4215-8333-f98ba0a2e25d
AA0471, AA0472 and AA0474 have no violations anywhere in the repository, so their overrides are removed outright. AA0473 and AS0112 each have a handful of violations. Rather than keeping the rules disabled for the whole repository, the individual sites are marked with #pragma warning disable so they become accepted violations, and the overrides are removed as well. Related to AB#640773 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7e6fd312-fe92-4215-8333-f98ba0a2e25d
CI showed that the earlier scope was based on incomplete local coverage: AA0473 and AS0112 have several hundred violations across the repository, so their overrides are restored and they are left for dedicated remediation. AA0471 and AA0474 turned out to have only six sites in total, all in the Withholding Tax app, and all of them are genuine omissions rather than acceptable exceptions. They are fixed by supplying the missing AutoFormatExpression, matching what neighbouring fields in the same tables already do. The accumulator table has no currency, so it formats in local currency. Related to AB#640773 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7e6fd312-fe92-4215-8333-f98ba0a2e25d
Removes 14 overrides from src/rulesets/base.ruleset.json so the rules inherit Error from ./ruleset.json. Selected from CI-derived violation counts (all estimated at 10 or fewer distinct sites): AW0003, AW0004, AW0014, AL0520, AL0523, AL0547, AL0589, AL0679, AL0717, AL0719, AL0749, AS0052, AS0058, PTE0007 Override count: 100 -> 86. CodeCop (AA*) rules are deliberately excluded here because removing CodeCop entries perturbs AA0021 reporting. Related to AB#640773 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7e6fd312-fe92-4215-8333-f98ba0a2e25d
Jesper Schulz-Wedde (JesperSchulz)
deployed
to
triage
August 14, 2026 09:38 — with
GitHub Actions
Active
Reduces the promotion set from 14 rules to the 7 whose violations are
fully resolved here. Override count: 100 -> 93.
Fixed in code:
AL0679 Email Logging Install codeunit was missing from the
'Email Logging - Obj.' permission set.
AW0014 The hidden 'F&unctions' group on the ES Account Schedule Names
page contained the target of a promoted actionref, which made
the promoted action unreachable.
AS0052 Two app.json 'help' URLs had a leading space.
Accepted with #pragma warning disable (documented in place):
AL0547 Four published integration events declare GlobalVarAccess.
Turning it off is a breaking change for existing subscribers.
AL0523 Three 'Posted Deposit Line' methods are part of the released
public surface; renaming them would be breaking.
AS0058 / PTE0007
26 asserterror statements in 11 test library codeunits that
intentionally wrap asserterror for use by test codeunits.
Deferred (overrides retained, need real remediation or owner input):
AL0520 obsolete table references, AL0589 duplicate report column names
(breaks RDLC layouts), AL0717 FlowFields with no CalcFormula (broken
fields, needs domain input), AL0719, AL0749 internal types on public
methods, AW0003, AW0004 Blob page fields.
Related to AB#640773
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7e6fd312-fe92-4215-8333-f98ba0a2e25d
…cationTestLibrary manifests AL0523 is reported without a source location (project-level symbol comparison), so #pragma warning disable cannot suppress it. Restore its Warning override and revert the pragma in PostedDepositLine.Table.al. AS0052 fired on the DemoTool and Application Test Library views because their layer manifests do not declare 'url'. Add the standard Microsoft link used by the other 786 app.json files in the repository. Related to AB#640773 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7e6fd312-fe92-4215-8333-f98ba0a2e25d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Continues the ruleset hardening work from #10088 and #10209. Promotes 7 rules back to
Errorby removing their overrides fromsrc/rulesets/base.ruleset.json, and resolves every violation those rules report.Override count: 100 → 93.
Stacked on #10209 — please merge that one first.
Fixed in code
AL0679Email Logging Installcodeunit was missing from theEmail Logging - Obj.permission set, so it was not covered by any entitlement. Every other object in the app was already listed.AW0014F&unctionsgroup on the ESAccount Schedule Namespage containedExport Schedules to ASC format, which is the target of a promotedactionref. Hiding the group made the promoted action unreachable, so theVisible = falseis removed.AS0052app.jsonhelpURLs had a leading space, making them invalid URLs.Accepted with
#pragma warning disableEach suppression is documented in place with the reason.
AL0547GlobalVarAccess. Turning it off would break existing external subscribers.AL0523Posted Deposit Linemethods that are part of the released public surface; renaming them would be breaking.AS0058/PTE0007asserterrorstatements in 11 test library codeunits. These areSubtype = Normalhelpers that deliberately wrapasserterroron behalf of test codeunits, which is exactly what these rules flag.Deferred
These were in the original scope but need real remediation or domain-owner input, so their overrides are retained:
AL0717— FlowFields with noCalcFormula(Script Editor Line."Has Errors",Statutory Report Data Header."Requisites Quantity"/."Set Requisites Quantity"). These are activelyCalcFields'd, so they silently always return 0/false. Genuine latent bugs; suppressing them would enshrine the bug.AL0589— duplicate report column/data item names across ~27 reports. Renaming columns breaks RDLC and Word layouts.AL0520— references to removed tables (Intrastat,Invoice Post. Buffer,Payment Buffer,VAT Code). Real obsolescence debt.AL0749— public method parameters withInternaltypes. Resolving means changing accessibility, i.e. an API change.AL0719,AW0003,AW0004— small counts but the sites could not be pinpointed from CI logs alone (CI reports no file/line).Notes
AA*) rules are deliberately excluded from this PR. Removing CodeCop entries perturbsAA0021reporting (observed in Restore Error severity for 13 dead base app ruleset entries #10138), so those get their own PR.AL1430was considered but is defined in the sharedruleset.json, not in the base override list, so it is out of scope here.Related to AB#640773