docs(PC0038, FC0007, LC0089): document FieldError as a flow terminator - #153
Open
Arthurvdv wants to merge 1 commit into
Open
docs(PC0038, FC0007, LC0089): document FieldError as a flow terminator#153Arthurvdv wants to merge 1 commit into
Arthurvdv wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents the behaviour introduced by ALCops/Analyzers#464 (fixes ALCops/Analyzers#463): the built-in
Record.FieldError(...)andFieldRef.FieldError(...)are now treated likeError(...)by PC0038, FC0007 and LC0089/LC0090. Issue #463's acceptance criteria ask forFieldErrorto be mentioned alongsideErrorin the public docs.Changes
Error(...),Record.FieldError(...)andFieldRef.FieldError(...)as accepted path terminators, adds aFieldErrorexample, and notes that user-defined procedures namedError/FieldErrordo not terminate a path.ScopeLeavingModerow (ErrorOnly/ExitAndErroralso coverFieldError) and theErrorOnlyexample mentionFieldError.ifa guard clause (exit,break,continue,CurrReport/CurrXMLportSkip/Break/Quit, built-inError/FieldError) and that user-definedError/FieldErrorkeep their increment. This records the LC0089 metric change from #464:Rec.FieldError(...)andError(...)guards now get the guard discount (previously onlyCurrReport/CurrXMLportcommands,exitand a lexicalErrordid), while user-definedError()/FieldError()no longer do.Ships with the release that includes ALCops/Analyzers#464 (
release/v1.1.0).🤖 Generated with Claude Code