Skip to content

chore: trim a comment defending code that no longer exists - #19

Merged
non7top merged 1 commit into
masterfrom
chore/trim-stale-heading-comment
Sep 7, 2026
Merged

non7top merged 1 commit into
masterfrom
chore/trim-stale-heading-comment

Conversation

@non7top

@non7top non7top commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Comment-only. No behavior change.

Found while auditing for useless multiline comments. The middle paragraph above the changelog-trimming awk block justified a fenced-block guard against promoting a shell comment into a Markdown heading — logic for demoting headings that isn't in this file any more.

It was written for an earlier ## comment header, which needed the quoted release's headings pushed down a level so the version heading wouldn't outrank the header framing it. Once the header became # (in an earlier PR), headings already nest correctly with nothing to rewrite, and the demotion code — plus the fenced-block guard protecting it — was removed. The comment defending that guard's existence stayed behind.

Every other comment in this block explains what the code does; this one explained what it doesn't do and why not, for a decision the code no longer makes. Folded to one line that states the current (simple) behavior instead.

pre-commit run --files action.yml passes.

The middle paragraph of the comment above the changelog-trimming awk
block justified a fenced-block guard against promoting a shell comment
into a Markdown heading — logic for demoting headings that isn't in this
file. It was written for an earlier `##` header, which needed the
quoted release's headings pushed down a level to avoid outranking it;
once the header went to `#`, headings already nest correctly with
nothing to rewrite, and the demotion code (and its guard) was removed
along with the need for it. The comment defending that guard stayed.

Every other comment in this block explains what the code does; this one
explained what it doesn't do and why not, for a decision the code no
longer makes. Folded to one line.
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

🤖 release-please PREVIEW

What merging this PR into master would trigger:

🤖 I will create a release beep boop

1.5.1 (2026-09-07)

Bug Fixes

  • name the simulated merge commit in the previewed changelog (1709a26)
  • name the simulated merge commit in the previewed changelog (5a41269)

This PR was generated with Release Please. See documentation.

Predicted from 0367632 merged into master at 1709a26, with the PR title read as chore: trim a comment defending code that no longer exists · Full run

@non7top
non7top merged commit 6ccd930 into master Sep 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant