GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: name the trailer in the CC014 advice when the message has no blank line by shenxianpeng · Pull Request #696 · commit-check/commit-check

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Nov 12, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Before: With ai_attribution = "disclose", a commit message with no blank line in it (a single line, or a subject followed directly by the tool's mark) failed CC014 with empty advice.

$ echo 'feat: add login page 🤖 Generated with Claude Code' | commit-check --message
✖ CC014 ai-disclosure failed: 🤖 Generated with Claude
  AI assistance is not disclosed with Assisted-by or Generated-by — detected: Claude Code
  Suggest: Disclose the tool with ""
  Docs:    https://commit-check.com/rules/#cc014

After: The advice names the trailer to add.

✖ CC014 ai-disclosure failed: 🤖 Generated with Claude
  AI assistance is not disclosed with Assisted-by or Generated-by — detected: Claude Code
  Suggest: Disclose the tool with "Assisted-by: Claude Code"
  Docs:    https://commit-check.com/rules/#cc014

A message that already has a blank line was not affected and prints the same advice as before.

How: The proposed fix puts a blank line before the trailer it adds. When the message had no blank line of its own, that blank line was the first new line, and the advice quoted it. _added_lines now leaves blank lines out. One parametrized test covers both message shapes; it fails on main and passes here.

Summary by CodeRabbit

  • Bug Fixes
    • Blank lines are no longer counted as added content when comparing changes.
    • AI-disclosure advice now handles tool stamps on the commit subject line or immediately after it, and provides a corrected trailer suggestion.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@shenxianpeng
fix: name the trailer in the CC014 advice when the message has no bla…
c1b6273
…nk line

The proposed fix puts a blank line before the trailer it adds. For a
message with no blank line of its own, that blank line was the first
added line, so the advice read: Disclose the tool with "".
@shenxianpeng
shenxianpeng requested a review from a team as a code owner November 12, 2026 13:12
@github-actions github-actions Bot added the bug Something isn't working label Nov 12, 2026
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The added-line comparison now omits blank lines. A parameterized test checks that disclosure validation fails and offers the expected fix and suggestion for two Claude Code stamp placements.

Changes: Added-line filtering and disclosure

Layer / File(s) Summary
Filter added lines and verify disclosure
commit_check/engine.py, tests/engine_fixes_test.py
_added_lines excludes whitespace-only lines. A parameterized test checks disclosure failure, the inserted blank line, and the suggestion for two stamp placements.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested labels: bug

Merge Risk: Minimal · up to c1b62

This fixes empty CC014 advice when a commit message has no blank line, and a regression test covers the fix. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the CC014 advice now names the trailer to add when the commit message has no blank line. The raw summary describes the engine change that drops blank lines from _added…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title names the main change: the CC014 advice now names the trailer to add when the commit message has no blank line. The raw summary describes the engine change that drops blank lines from _added_lines, and the added test covers the no-blank-line case, so the title matches the changeset.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 15846382-714d-4d82-b9c3-9389c55d149c
Commits

Reviewing files that changed from the base of the PR and between 0659e65 and c1b6273.

Files selected for processing: 2

  • commit_check/engine.py
  • tests/engine_fixes_test.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sonarqubecloud

sonarqubecloud Bot commented Nov 12, 2026

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codecov

codecov Bot commented Nov 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (0659e65) to head (c1b6273).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #696   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           15        15           
  Lines         2600      2600           
  Branches       508       508           
=========================================
  Hits          2600      2600           

☔ 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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codspeed

codspeed Bot commented Nov 12, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Merging this PR will degrade performance by 24.32%

2 warnings

⚠️ 134 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚠️ 1 benchmark with a significant change ran on different hardware

Its base and head results were measured on machines with a different CPU, core count or memory, so the change might not come from the code. Run base and head on the same runner type.

Learn more about Macro Runners

See affected benchmarks

❌ 1 regressed benchmark
✅ 684 untouched benchmarks
⏩ 131 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ test_words_and_body_mentions_are_not_wip[wipe the cache] 298.8 µs 394.9 µs -24.32%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing fix/cc014-empty-suggestion (c1b6273) with main (c5904d6)2

Open in CodSpeed

Footnotes

  1. 131 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on main (0659e65) during the generation of this report, so c5904d6 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shenxianpeng
shenxianpeng merged commit 52685e5 into main Nov 12, 2026
39 of 40 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@shenxianpeng
shenxianpeng deleted the fix/cc014-empty-suggestion branch November 12, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

bug Something isn't working

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@shenxianpeng
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.