Skip to content

docs: add LC0100 - Global variable could be local - #165

Draft
someC0d3r wants to merge 3 commits into
ALCops:mainfrom
someC0d3r:feat/lc0100-global-variable-could-be-local
Draft

docs: add LC0100 - Global variable could be local#165
someC0d3r wants to merge 3 commits into
ALCops:mainfrom
someC0d3r:feat/lc0100-global-variable-could-be-local

Conversation

@someC0d3r

Copy link
Copy Markdown

Adds the public documentation for LC0100, GlobalVariableCouldBeLocal.

Summary

The new rule page documents:

  • why procedure-only global variables should be moved to local scope;
  • before-and-after AL examples;
  • the conditions under which LC0100 reports a diagnostic;
  • conservative exclusions where retained object state may still matter;
  • type-aware diagnostic messages, including quoted record type names;
  • the separate wording used for immutable labels;
  • that the rule is disabled by default and has no code action.

LC0100 is also added to the LinterCop rule index and linked to Discussion #499.

Verification

  • The Hugo site build passed successfully with 164 pages.
  • The message examples were checked against the analyzer output.
  • The documented behavior was validated with the Microsoft Base Application and Microsoft Subcontracting App.

Companion analyzer draft PR: ALCops/Analyzers#506


This documentation and draft PR were created with Codex using GPT-5.6 Sol with Ultra reasoning.

@someC0d3r

Copy link
Copy Markdown
Author

reopened due to main PR ALCops/Analyzers#506 got also reopened

@someC0d3r someC0d3r reopened this Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant