Skip to content

Feature: Add PC0038 and LC0097 Return-Flow Diagnostics #392

Description

@MODUSCarstenScholling

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    part of upcoming releaseAvailable in alpha/beta and waiting to be included in the next stable release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions