mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 22:56:55 +01:00
- pages-must-not-contain-business-logic.good.al/.bad.al: the "good" codeunit still directly assigned real Sales Line."Line Amount" and called Modify(), bypassing the field's normal Validate cascade (discount, VAT, related-amount maintenance) - persisting inconsistent document lines regardless of which object the code lived in. Replaced the real Sales Line example with a self-contained "Sample Order Line" table and switched the codeunit to Validate()/Modify(true), so the fixture demonstrates the page-vs-codeunit separation without teaching unsafe direct field writes to a real BC document table. - bcpt-scenarios-must-be-app-specific.good.al: Customer.FindFirst() assumed a pre-existing customer (fails against an empty environment), and a session-local NextNo counter for the header key collides across concurrent BCPT sessions and repeated runs. Creates its own customer when none exists, and generates keys from CreateGuid() instead of an in-memory counter. - upgrade-tag-logic-must-not-nest-deeply: the rule conflated two different things - nesting one tag's existence check inside another (the real anti-pattern Microsoft's guidance warns against) with having business-data safety conditions inside a single tagged migration's own loop body (which Microsoft's own worked example does, and its own design guidance explicitly requires: "Implement extra safety checks to avoid data corruption, even though you're using upgrade tags"). Rewrote the Description/Best Practice/Anti Pattern to scope the rule to actual tag nesting and migrations blended under one tag, and rewrote both fixtures: good.al now shows two safety conditions correctly nested inside one migration's own loop plus a second, genuinely separate migration as its own flat tagged procedure; bad.al now shows the real anti-pattern, one tag's check nested inside another's guarded body. - table-design-must-match-bc-table-type-conventions: the rule and its worklist cue fired on any new table with a keys block, forcing buffers, queues, logs, mapping tables, and staging tables into the nearest-looking one of nine business-record archetypes. Added an explicit scope note that these nine types aren't an exhaustive table catalogue, and narrowed the al-data-modeling-review.md cue to require positive evidence (a type-specific naming suffix, key shape, or usage) before worklisting, instead of a bare keys/primary-key declaration. |
||
|---|---|---|
| .. | ||
| check-blocked-in-referencing-code-not-in-master.bad.al | ||
| check-blocked-in-referencing-code-not-in-master.good.al | ||
| check-blocked-in-referencing-code-not-in-master.md | ||
| code-must-not-change-workdate.bad.al | ||
| code-must-not-change-workdate.good.al | ||
| code-must-not-change-workdate.md | ||
| initialize-document-defaults-in-initrecord.bad.al | ||
| initialize-document-defaults-in-initrecord.good.al | ||
| initialize-document-defaults-in-initrecord.md | ||
| insert-only-transfer-may-rely-on-caller-cleanup.md | ||
| master-table-no-from-number-series-in-oninsert.bad.al | ||
| master-table-no-from-number-series-in-oninsert.good.al | ||
| master-table-no-from-number-series-in-oninsert.md | ||
| owning-table-must-delete-dependents-in-ondelete.bad.al | ||
| owning-table-must-delete-dependents-in-ondelete.good.al | ||
| owning-table-must-delete-dependents-in-ondelete.md | ||
| pictures-must-use-media-not-blob.bad.al | ||
| pictures-must-use-media-not-blob.good.al | ||
| pictures-must-use-media-not-blob.md | ||
| round-direction-symbols-use-magnitude.bad.al | ||
| round-direction-symbols-use-magnitude.good.al | ||
| round-direction-symbols-use-magnitude.md | ||
| set-last-date-modified-in-onmodify-and-onrename.bad.al | ||
| set-last-date-modified-in-onmodify-and-onrename.good.al | ||
| set-last-date-modified-in-onmodify-and-onrename.md | ||
| setup-table-is-a-singleton.bad.al | ||
| setup-table-is-a-singleton.good.al | ||
| setup-table-is-a-singleton.md | ||
| share-mediaset-items-with-insert-not-field-assignment.bad.al | ||
| share-mediaset-items-with-insert-not-field-assignment.good.al | ||
| share-mediaset-items-with-insert-not-field-assignment.md | ||
| table-design-must-match-bc-table-type-conventions.bad.al | ||
| table-design-must-match-bc-table-type-conventions.good.al | ||
| table-design-must-match-bc-table-type-conventions.md | ||
| table-relation-extensions-are-additive-and-top-down.bad.al | ||
| table-relation-extensions-are-additive-and-top-down.good.al | ||
| table-relation-extensions-are-additive-and-top-down.md | ||
| transferfields-skip-type-mismatch-can-drop-data.bad.al | ||
| transferfields-skip-type-mismatch-can-drop-data.good.al | ||
| transferfields-skip-type-mismatch-can-drop-data.md | ||
| use-no-series-codeunit-not-noseriesmanagement.bad.al | ||
| use-no-series-codeunit-not-noseriesmanagement.good.al | ||
| use-no-series-codeunit-not-noseriesmanagement.md | ||
| validate-table-relation-false-suppresses-rename-propagation.bad.al | ||
| validate-table-relation-false-suppresses-rename-propagation.good.al | ||
| validate-table-relation-false-suppresses-rename-propagation.md | ||
| xrec-is-a-before-image-only-in-some-triggers.bad.al | ||
| xrec-is-a-before-image-only-in-some-triggers.good.al | ||
| xrec-is-a-before-image-only-in-some-triggers.md | ||