Skip to content

fix(formula): check each optional before the evaluator reads it - #1243

Merged
andiwand merged 1 commit into
mainfrom
fix/formula-tidy
Oct 24, 2026
Merged

andiwand merged 1 commit into
mainfrom
fix/formula-tidy

Conversation

@andiwand

@andiwand andiwand commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

Summary

clang-tidy fails on main, in run 40111475073 and later runs:

Changes:

  • iterate(cycle, iteration) takes the iteration settings that its caller checked.
  • Call::value and Call::array bind the given value once.
  • An array cell checks its array before it reads it.
  • external_sheet_of now refuses a reference that names no document. It read that document without a check.

The wasm size ratchet is fixed in the stacked PR.

Test

  • Local clang-tidy reports no finding in the three files.
  • 539 formula and sheet tests pass.

clang-tidy fails main on the formula sources:

- `performance-no-automatic-move`: a const local stops the move of
  the `spell_reads` result.
- `bugprone-unchecked-optional-access`: eight reads of an optional
  have no check that clang-tidy can see.

`external_sheet_of` now refuses a reference that names no document. It
read that document without a check.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017QtawyvLP2SCnoBtnVfFed
@andiwand
andiwand merged commit 5622ace into main Oct 24, 2026
22 of 23 checks passed
@andiwand
andiwand deleted the fix/formula-tidy branch October 24, 2026 17:37
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