Skip to content

Fix indentation of end in function stubs written on separate lines - #227

Merged
fredrikekre merged 1 commit into
masterfrom
fe/stubs
Sep 23, 2026
Merged

fredrikekre merged 1 commit into
masterfrom
fe/stubs

Conversation

@fredrikekre

Copy link
Copy Markdown
Owner

Function stubs such as

function f

end

were formatted with an indented end because the newline before the end keyword was never tagged as pre-dedent in the empty-function branch of indent_function_or_macro.

Fixes #226.

Function stubs such as

    function f

    end

were formatted with an indented `end` because the newline before the
`end` keyword was never tagged as pre-dedent in the empty-function
branch of `indent_function_or_macro`. Fixes #226.

Also, route the body-block branch of `indent_function_or_macro`
through `indent_keyword_block_end!`, the shared "tag keyword, indent
block, tag end" helper already used for loops, structs, do blocks and
modules, instead of duplicating it.

Assisted-by: Claude Code (Fable 5.1)
@codecov

codecov Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.60%. Comparing base (c106698) to head (4de34e5).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #227      +/-   ##
==========================================
- Coverage   90.61%   90.60%   -0.01%     
==========================================
  Files           9        9              
  Lines        4091     4088       -3     
==========================================
- Hits         3707     3704       -3     
  Misses        384      384              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fredrikekre
fredrikekre merged commit 7fcd506 into master Sep 23, 2026
15 checks passed
@fredrikekre
fredrikekre deleted the fe/stubs branch September 23, 2026 07:14
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.

Function stub behavior

1 participant