GeezerVison is showing github.com — feat: add GitHub Actions output format by PNHD · Pull Request #468 · cpplint/cpplint
Conversation
PNHD
commented
Aug 31, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Fixes #419.
Summary
- add
--output=github support for GitHub Actions annotations
- emit cpplint findings as
::warning workflow commands
- include file, line, and cpplint title metadata
- escape GitHub Actions command data and properties correctly
- treat GitHub output as machine-readable output on stdout
- document the new output format in the CLI help and changelog
- add CLI regression coverage and unit tests for command escaping
Testing
pytest --no-cov cpplint_clitest.py -k github_output
pytest --no-cov cpplint_unittest.py -k github_command_escaping
- full test suite: 233 passed
- total coverage: 96.48%
- repository pre-commit checks: passed
Summary by CodeRabbit
-
New Features
- Added a
--output=github format that emits GitHub Actions warning annotations.
- Included file, line, title, and lint category details in generated annotations.
- Updated command-line help and output format validation to support the new option.
-
Documentation
- Added the GitHub output format to the unreleased changelog.
-
Tests
- Added coverage for GitHub annotation formatting and special-character escaping.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Aug 31, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Team
Run ID: 7f6f074a-446d-4957-99d0-71eb8011f2f4
📥 Commits
Reviewing files that changed from the base of the PR and between e5bf542 and 307051b.
📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.
📝 Walkthrough
Walkthrough
cpplint adds --output=github. The format emits escaped GitHub Actions warning annotations with file, line, title, and lint message data. CLI validation, help text, changelog content, integration tests, and escaping unit tests are updated.
Changes
GitHub Actions output
| Layer / File(s) |
Summary |
Register the github output format cpplint.py |
CLI usage, help text, validation, machine-output handling, and output-format documentation include github. |
Format and escape warning annotations cpplint.py |
New escaping helpers encode GitHub command data and properties. Error() emits ::warning annotations with file, line, title, and message values. |
Validate the output format cpplint_clitest.py, cpplint_unittest.py, CHANGELOG.rst |
Tests verify annotation output and escaping behavior. The changelog records the new format. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Merge Risk: ⚪ Minimal · up to 30705
This adds GitHub Actions warning annotations for cpplint findings, with escaped metadata and messages. The command format, CLI behavior, and escaping are covered by tests, so the change is ready to merge.
Suggested reviewers: aaronliu0130
Sequence Diagram(s)
sequenceDiagram
participant CLI
participant Error
participant stdout
CLI->>Error: report lint error with github output
Error->>Error: escape command properties and data
Error->>stdout: write ::warning annotation
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name |
Status |
Explanation |
Resolution |
| Docstring Coverage |
⚠️ Warning |
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 3 files. |
Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name |
Status |
Explanation |
| Description Check |
✅ Passed |
Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check |
✅ Passed |
The title clearly and concisely describes the primary change: adding a GitHub Actions output format. |
| Linked Issues check |
✅ Passed |
The changes implement issue #419 by adding the --output=github formatter, emitting GitHub Actions warning annotations, escaping command data and properties, and adding tests and documentation. |
| Out of Scope Changes check |
✅ Passed |
The changelog, CLI help updates, escaping helpers, formatter registration, and regression tests directly support the GitHub output objective. No unrelated code changes are identified. |
- Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
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
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed current head 307051b.
The GitHub Actions annotation format and escaping look correct. Command data escapes %, CR, and LF, while properties additionally escape : and ,. Adding github to the machine-output formats also keeps informational output out of the annotation stream.
Verified locally:
- targeted GitHub-output tests pass
- full suite: 233 passed, 96.48% coverage
- pylint passes
I also checked unusual filename/property characters and the linenum <= 0 path; I didn't find a blocking issue.
LGTM.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This branch has not been deployed
No deployments
Reviewers
cclauss
cclauss approved these changes
+1 more reviewer
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Add a github output format
Uh oh!
There was an error while loading. Please reload this page.
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.
|