Skip to content

Fix lint findings in the R chunks of r-config.qmd - #1430

Merged
dem-extra1 merged 1 commit into
mainfrom
claude/lint-r-config
Nov 1, 2026
Merged

dem-extra1 merged 1 commit into
mainfrom
claude/lint-r-config

Conversation

@dem-extra1

Copy link
Copy Markdown
Collaborator

Closes #1429.

Clears the 11 lint findings in the two R chunks of chapters/r-config.qmd so a PR that touches the file can pass lint-changed-files:

  • Two long comment lines are wrapped onto their own lines above the library() calls.
  • The commented-out library(printr) becomes a note that printr is not loaded.
  • The theme_set() call is re-indented.
  • legend_text_size and run_graphs use <-.
  • options('digits' = 6) is options(digits = 6), which sets the same option.

Behaviour is unchanged. lintr::lint() on the file reports no lints, and chapters/binary-outcome-associations.qmd, which includes it, renders to HTML.

Thread: Fix heading levels in split-out pages (project thread). It unblocks #1428.


Generated by Claude Code

Wrap long comment lines, indent the theme_set call, use <- for
assignment, use options(digits = 6), and replace commented-out code with
a note.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FWgYrDiMYAnjPMHWVTPJfZ
@github-actions

Copy link
Copy Markdown
Contributor

Claude finished review — View run


Review: #1430 — Fix lint findings in the R chunks of r-config.qmd

Scope. Single file, chapters/r-config.qmd, +16/-10, purely mechanical lint cleanup in the two R chunks (packages, r-config). No behavioral changes are intended or introduced.

Verification performed

  • Read the full diff and the surrounding file (chapters/r-config.qmd:1-75).
  • Confirmed against .lintr.R which default linters are active (line_length_linter at 80 chars, assignment_linter, commented_code_linter, trailing_whitespace_linter disabled, pipe_consistency_linter).
  • Measured the pre-PR line lengths directly from origin/main: the two wrapped library(broom) / library(broom.helpers) lines were 85 and 106 chars (over the 80-char limit), confirming the line-length fix was warranted and complete.
  • Confirmed the parenthesization of the reformatted ggplot2::theme_set(...) call is still balanced and semantically identical to the original (same number of closing parens, just spread across lines).
  • Confirmed options(digits = 6) and options('digits' = 6) are equivalent in R (quoted argument names in call position are treated as syntactic names) — no behavior change.
  • Confirmed <- vs = conversions are the only change to legend_text_size and run_graphs — no value change.
  • Verified the linked issue, Fix lint findings in the R chunks of r-config.qmd #1429, lists exactly the five lint categories this diff fixes (commented code, >80-char lines, hanging indents, a single-quoted name, = assignments) — matches the diff, not a hallucinated justification.
  • Verified the include chain: chapters/shared-config.qmd includes r-config.qmd, and chapters/binary-outcome-associations.qmd (the chapter the PR description says it rendered) does include shared-config.qmd — the render claim checks out.
  • No math changed in this diff, so the LaTeX-macro check (latex-macros/macros.qmd, vendored via .gitmodules) doesn't apply — skipping it is correct, not an omission.
  • Could not independently run lintr::lint(), quarto render, or spelling::spell_check_package() — neither R nor Quarto is installed in this sandbox. The review above is based on manual static inspection and cross-checks rather than re-executing the CLAUDE.md pre-commit checklist; nothing found contradicts the PR's stated results.

Non-blocking observations

  • chapters/r-config.qmd is included (via shared-config.qmd) by 18 different chapters, not just binary-outcome-associations.qmd. CLAUDE.md's pre-commit checklist says to render "each parent chapter whose subfiles were edited" — a literal reading covers all 18 downstream chapters, and the PR description only mentions testing one. Given the change is comment/whitespace/assignment-operator-only with no altered values or options, the risk of breaking any of the other 17 render chains is minimal, so I'd treat this as an optional process note rather than a blocker.
  • Two pre-existing issues touched by this diff's line movement but correctly left unfixed (per the "fix only what you changed" rule in CLAUDE.md's Workflow Responsibility section): the duplicate conflicts_prefer(dplyr::filter) call (chapters/r-config.qmd:30 and :54), and the stray comment text dplyr() instead of dplyr::filter()/dplyr (chapters/r-config.qmd:53). Both predate this PR, so leaving them is the right call, not an omission.

No bugs, no CLAUDE.md violations, no hallucinated APIs/citations/links, no SERG lab-manual issues (pure comment/style/assignment-operator fixes, consistent with tidyverse conventions).

Verdict

Ready for merge

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "1604b8135ca5e7c1d40a51159de5cada21f90e76",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "Reviewed chapters/r-config.qmd line by line against origin/main; confirmed line-length, assignment-operator, and commented-code fixes match the lint categories in issue #1429 with no semantic or behavioral change.",
  "holistic_assessment": "Scope is a single mechanical lint-cleanup file with no new chapter wiring required; render verification covered only one of eighteen downstream including chapters, a low-risk gap given the purely cosmetic diff."
}

Reviewed commit: 1604b81

@github-actions

Copy link
Copy Markdown
Contributor

💰 Cost: $0.5020 (review) — run

@dem-extra1

Copy link
Copy Markdown
Collaborator Author

🤖 Antigravity agent report

Cross-harness review (Gemini 3.8 Flash (Medium) via Antigravity agy 1.3.5, standing in while Argon quota is exhausted, read-only plan mode) at 1604b81

I gave the model the full diff (one file, 16 added and 10 removed lines) and asked it to look for any behaviour change in the two R chunks of chapters/r-config.qmd.
I read the diff myself as well: the re-indented theme_set() call has the same structure (theme_bw() + theme(legend.position = "bottom", text = element_text(...)), with the closing parentheses moved onto their own lines); the commented-out labs(col = "") line stays a comment; options('digits' = 6) and options(digits = 6) set the same option; legend_text_size <- 9 and run_graphs <- TRUE are the same top-level assignments as =; the library() calls are the same, in the same order, with only their trailing comments moved to their own lines; and the moved comment sits directly above the second conflicts_prefer(dplyr::filter) call it describes.
The model reported no behaviour change, nothing lint would still flag, and no misleading comment; it found nothing.
I did not run lintr or render the file, so the description's "no lints" and the render of binary-outcome-associations.qmd are the author's checks.

Verdict

VERDICT: CLEAN

Reviewed-Commit: 1604b81

Posted by Claude Code (AI agent) --- not written by a human.

@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
🚀 Preview available at: https://Morrison-Lab.github.io/rme/pr-preview/pr-1430/

Built to branch gh-pages at 2026-10-30 22:10 UTC.

@dem-extra1
dem-extra1 merged commit abab195 into main Nov 1, 2026
32 checks passed
@dem-extra1
dem-extra1 deleted the claude/lint-r-config branch November 1, 2026 09:56
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.

Fix lint findings in the R chunks of r-config.qmd

2 participants