Skip to content

Test function declaration indention at indent_by = 4 - #1299

Merged
lorenzwalthert merged 1 commit into
r-lib:mainfrom
GoekeLab:test_fun-dec-indent-by
Sep 28, 2026
Merged

lorenzwalthert merged 1 commit into
r-lib:mainfrom
GoekeLab:test_fun-dec-indent-by

Conversation

@adityaruplaha

@adityaruplaha adityaruplaha commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #1298, which fixed function declaration indention under indent_by != 2 without a test.

Adds a test_collection() pair covering the three cases that were wrong: formals on their own line, the threshold at 2 * indent_by that separates single from hanging indention, and a nested declaration. The hanging case is included to pin that it is still recognised. All four fail on the commit before #1298 except the hanging one.

🤖 Generated with Claude Code, with human review. Work supported by @GoekeLab.

Covers the three cases r-lib#1178 got wrong: formals on their own line, the
threshold at 2 * indent_by that separates single from hanging
indention, and a nested declaration. The hanging case is included to
pin that it is still recognised.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PefX8qkninc5xGA2eCJ4aD
@adityaruplaha

Copy link
Copy Markdown
Contributor Author

Pre-commit failure is not related to the PR; it seems like a dependency issue?

@lorenzwalthert

Copy link
Copy Markdown
Collaborator

Great. Thanks. Yes, pre-commit is some sort of system dependency problem. Maybe it’s too old, not compatible with ubuntu-latest or similar. If you want, I appreciate separate PR to fix it😊

@lorenzwalthert
lorenzwalthert merged commit 319fb36 into r-lib:main Sep 28, 2026
12 of 13 checks passed
@adityaruplaha
adityaruplaha deleted the test_fun-dec-indent-by branch September 28, 2026 09:20
@adityaruplaha

Copy link
Copy Markdown
Contributor Author

Sent #1300 for the pre-commit failure. It was two things: apt install resolving against the runner image's stale package index, and, once that is out of the way, seq_linter() on R/utils.R:31 from the development version of lintr the hook installs.

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.

2 participants