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 — feat: add GitHub Actions output format by PNHD · Pull Request #468 · cpplint/cpplint

Conversation

@PNHD

@PNHD PNHD commented Aug 31, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

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.

All reactions
@coderabbitai

coderabbitai Bot commented Aug 31, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Review Change Stack

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)
  • cpplint_unittest.py

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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

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

@PNHD PNHD mentioned this pull request Aug 31, 2026
Looking for more maintainers #402
Open
@PNHD
feat: add GitHub Actions output format
307051b
@PNHD
PNHD force-pushed the fix/419-github-output-format branch from e5bf542 to 307051b Compare September 7, 2026 00:43
walidbi200
walidbi200 approved these changes Sep 13, 2026
View reviewed changes

@walidbi200 walidbi200 left a comment

Copy link
Copy Markdown

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.

All reactions
@cclauss
cclauss self-requested a review September 13, 2026 19:40
cclauss
cclauss approved these changes Sep 13, 2026
View reviewed changes

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cclauss cclauss cclauss approved these changes
+1 more reviewer
@walidbi200 walidbi200 walidbi200 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

No one assigned

Labels

None yet

Projects

None yet

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.

3 participants

@PNHD @cclauss @walidbi200
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.