Feature: Add PC0038 and LC0097 Return-Flow Diagnostics
Summary
Introduce two new analyzer rules to improve return-flow correctness and consistency in AL code:
- PC0038: NotAllCodePathsReturnValue (info)
- LC0097: MixedExitAndNamedReturnAssignment (disabled by default)
Problem
Current analysis does not fully cover:
- routines that can end without returning a value
- routines that mix
exit(...) and named-return assignments
Both patterns reduce readability and increase risk of logic defects.
Scope
- Add PC0038 in PlatformCop
- Add LC0097 in LinterCop
- Add IDs, descriptors, resources, and analyzer wiring
- Add/adjust tests with meaningful positive/negative coverage
- Documentation pages and index references are handled in a PR in the documentation repo
See discussion Warning/error if procedure with return value doesn't contain exit() and doesn't assign to the named return value.
Feature: Add PC0038 and LC0097 Return-Flow Diagnostics
Summary
Introduce two new analyzer rules to improve return-flow correctness and consistency in AL code:
Problem
Current analysis does not fully cover:
exit(...)and named-return assignmentsBoth patterns reduce readability and increase risk of logic defects.
Scope
See discussion Warning/error if procedure with return value doesn't contain exit() and doesn't assign to the named return value.