Skip to content

build(fmt): braces on every if, a blank line around every if; lexbor in .vscode - #72

Merged
x-ror merged 1 commit into
masterfrom
build/if-rules
Nov 18, 2026
Merged

x-ror merged 1 commit into
masterfrom
build/if-rules

Conversation

@x-ror

@x-ror x-ror commented Nov 18, 2026

Copy link
Copy Markdown
Owner

What changed

  • if always has braces, on their own lines: no if x do y, no if x {y}.
  • A blank line before and after every if statement, unless it opens or closes a block or a case. A comment directly above belongs to the if.

Both rules are in CLAUDE.md §4 and applied by make fmt to Larva's own code (pkg/html, the shim): odinfmt convert_do, clang-format InsertBraces, then scripts/fmt-if.mjs for what neither formatter does. Same script and rules as x-ror/lava#504; Lava-synced files are left until the next sync brings that formatting over.

  • .vscode/c_cpp_properties.json puts lexbor's headers (.deps/lexbor/include) and picohttpparser on the include path, so the C/C++ extension stops reporting "#include errors detected" in the shim. .deps exists after scripts/build-lexbor.sh has run once.

Checked

Formatting only. Rebuilt and checked lava html --scripts --select by hand; odin check passes on linux, windows and darwin targets; a second make fmt changes nothing. No tests: paused for this phase.

🤖 Generated with Claude Code

…in .vscode

- CLAUDE.md §4: `if` always has braces on their own lines, and a blank line
  before and after every `if` statement unless it opens or closes a block or a
  case. Applied by `make fmt` to Larva's own code (pkg/html, the shim):
  odinfmt convert_do, clang-format InsertBraces, then scripts/fmt-if.mjs for
  what neither formatter does. Same script and rules as x-ror/lava#504.
- .vscode/c_cpp_properties.json: lexbor's headers (.deps/lexbor/include) and
  picohttpparser on the include path, so the C/C++ extension stops reporting
  "#include errors detected" in the shim. Run scripts/build-lexbor.sh once to
  create .deps.

Formatting only. Rebuilt and checked `lava html --scripts --select` by hand;
odin check passes on linux, windows and darwin targets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@x-ror
x-ror merged commit 1974065 into master Nov 18, 2026
4 of 5 checks passed
@x-ror
x-ror deleted the build/if-rules branch November 18, 2026 20:57
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