Skip to content

docs(PC0038, FC0007, LC0089): document FieldError as a flow terminator - #153

Open
Arthurvdv wants to merge 1 commit into
mainfrom
docs/pc0038-fc0007-lc0089-fielderror
Open

docs(PC0038, FC0007, LC0089): document FieldError as a flow terminator#153
Arthurvdv wants to merge 1 commit into
mainfrom
docs/pc0038-fc0007-lc0089-fielderror

Conversation

@Arthurvdv

Copy link
Copy Markdown
Member

Documents the behaviour introduced by ALCops/Analyzers#464 (fixes ALCops/Analyzers#463): the built-in Record.FieldError(...) and FieldRef.FieldError(...) are now treated like Error(...) by PC0038, FC0007 and LC0089/LC0090. Issue #463's acceptance criteria ask for FieldError to be mentioned alongside Error in the public docs.

Changes

  • PC0038 — the Exception section now lists Error(...), Record.FieldError(...) and FieldRef.FieldError(...) as accepted path terminators, adds a FieldError example, and notes that user-defined procedures named Error/FieldError do not terminate a path.
  • FC0007 — intro, checks table, exclusions list, the ScopeLeavingMode row (ErrorOnly / ExitAndError also cover FieldError) and the ErrorOnly example mention FieldError.
  • LC0089 — new paragraph defining which statements make an if a guard clause (exit, break, continue, CurrReport/CurrXMLport Skip/Break/Quit, built-in Error/FieldError) and that user-defined Error/FieldError keep their increment. This records the LC0089 metric change from #464: Rec.FieldError(...) and Error(...) guards now get the guard discount (previously only CurrReport/CurrXMLport commands, exit and a lexical Error did), while user-defined Error()/FieldError() no longer do.

Ships with the release that includes ALCops/Analyzers#464 (release/v1.1.0).

🤖 Generated with Claude Code

ALCops/Analyzers#464 (fixes ALCops/Analyzers#463) treats the built-in
Record.FieldError(...) and FieldRef.FieldError(...) like Error(...) in
PC0038 (path terminator), FC0007 (scope-leaving statement, covered by
ScopeLeavingMode ErrorOnly/ExitAndError) and LC0089/LC0090 (guard clause).

- PC0038: exception section names all three built-ins, adds a FieldError
  example and states that user-defined Error/FieldError procedures do not
  terminate a path.
- FC0007: intro, checks table, exclusions, ScopeLeavingMode row and the
  ErrorOnly example mention FieldError.
- LC0089: define which statements make an if a guard clause, including
  the built-in Error/FieldError and excluding user-defined procedures of
  the same name (records the metric change from #464).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant