Skip to content

[BUG] Main-branch C++ lint fails with 18 findings and reviewdog annotation overflow #244

Closed

Description

@bobsira

Describe the bug

The Lint C++ job fails on the main push at commit 63950c495f9ea26df4eabd588aced1aa8c27f601. Its log contains 18 unique cpplint findings across eight production-source files, followed by a reviewdog annotation-limit error. The log repeats the findings when reporting annotations; there are 18 distinct findings, not 36.

These are pre-existing findings exposed by the post-merge run, not C++ changes introduced by #243: that merge changed only .github/workflows/sdl-compliance-pipeline.yml. The C++ source tree and .github/workflows/lint.yml are unchanged from its parent.

Findings to track

Category Unique findings
build/include_what_you_use 15
build/include_subdir 1
readability/nolint 1
whitespace/blank_line 1
All 18 findings, with links to the exact source revision

All affected files are under LogMonitor\src\LogMonitor.

Source location Category Diagnostic
EtwMonitor.cpp:156 build/include_what_you_use Add #include <map> for map<>
EtwMonitor.cpp:1076 build/include_what_you_use Add #include <vector> for vector<>
EtwMonitor.cpp:1098 build/include_what_you_use Add #include <utility> for make_pair
EventMonitor.cpp:466 build/include_what_you_use Add #include <vector> for vector<>
JsonFileParser.cpp:581 build/include_what_you_use Add #include <vector> for vector<>
JsonFileParser.cpp:685 build/include_what_you_use Add #include <algorithm> for min
LogFileMonitor.cpp:632 whitespace/blank_line Redundant blank line at the end of a code block should be deleted.
LogFileMonitor.cpp:1383 build/include_what_you_use Add #include <utility> for move
LogFileMonitor.cpp:1414 build/include_what_you_use Add #include <memory> for shared_ptr<>
LogFileMonitor.cpp:1783 build/include_what_you_use Add #include <vector> for vector<>
LogFileMonitor.cpp:1979 build/include_what_you_use Add #include <string> for string
Main.cpp:139 build/include_what_you_use Add #include <utility> for move
Main.cpp:260 build/include_what_you_use Add #include <vector> for vector<>
Main.cpp:313 build/include_what_you_use Add #include <memory> for shared_ptr<>
pch.h:48 build/include_subdir Include the directory when naming header files
pch.h:51 readability/nolint NOLINT categories not supported in block END: build/include_order
ProcessMonitor.cpp:295 build/include_what_you_use Add #include <string> for string
Utility.cpp:212 build/include_what_you_use Add #include <vector> for vector<>

The pch.h reports concern the quoted shlwapi.h include and NOLINTEND(build/include_order). Preserve the existing Windows/PCH include-order constraints when fixing these; the file explicitly documents dependencies on that ordering.

Reporting failure

The same job reports:

reviewdog: GitHubActionLogWriter: reported too many annotation (N=18)
reviewdog: Too many results (annotations) in diff.

Its warning explains that GitHub logging-command annotations are limited to 10 warnings per step, so the annotations UI is not a complete inventory. Use the full log and the table above.

The executed action's entrypoint pipes cpplint directly into reviewdog without preserving a separate cpplint failure status. Track the reporting problem alongside the source findings: CI must fail on real lint diagnostics independently of annotation limits and PR diff filtering.

To reproduce

Use a clean checkout of the failing revision, without generated build or dependency directories. The equivalent cpplint invocation for the checked-in options is:

python -m pip install cpplint==2.0.2
$filter = '+build/include_order,+build/include_subdir,+whitespace/comma,+whitespace/end_of_line,-build/namespaces,-readability/casting,-runtime/reference,-whitespace/braces,-whitespace/parens,-whitespace/newline,-whitespace/comments,-build/c++11'
python -m cpplint --linelength=120 '--exclude=LogMonitor\LogMonitorTests\*' "--filter=$filter" --recursive .

The linked CI run is the reproduction evidence. The command above mirrors its linter configuration; the annotation overflow is specific to the GitHub/reviewdog reporting path. The current workflow excludes LogMonitor\LogMonitorTests\*.

Configuration

  • Tool: LogMonitor C++ lint workflow, job Lint C++.
  • Runner label: ubuntu-latest.
  • cpplint version observed in the job: 2.0.2.
  • Action: reviewdog/action-cpplint@master, resolved in this run to 39a6bdae620ccbee69f9e4b6631bb5ac6874a461.
  • Reporter: github-pr-check; diagnostic level: warning.

Existing work

Related PR: #235 - Fix Log Monitor lint and EventMonitor shutdown. It is still open and already proposes relevant source/include fixes, corrected PCH suppression, shared lint configuration, pinned cpplint, and separate lint execution versus PR annotation reporting. Coordinate with that PR rather than duplicating its cleanup. This issue tracks the observed main failure and confirmation that the eventual merged fix resolves it.

Expected behavior / completion criteria

  • Resolve the 18 reported findings while preserving Windows/PCH build behavior; do not hide them with broad lint suppression.
  • Make lint failure detection independent of reviewdog annotation filtering and reporting limits, while retaining useful PR annotations and complete diagnostic output.
  • Confirm the resulting lint workflow passes on a main push and a pull-request run after the fixes are integrated, with no annotation-overflow failure.

Activity

  1. bobsira commented on Nov 16, 2026

    @bobsira
    ContributorAuthor

    Verified all completion criteria and closing as completed by #235, merged as dc85266.

    • The source/include fixes and corrected, narrowly scoped PCH suppressions are merged. The shared lint configuration retains the reported include checks.
    • .github/workflows/lint.yml runs cpplint separately from reviewdog. The explicit Bash shell uses -e -o pipefail, so the xargs ... cpplint | tee pipeline fails on lint errors independently of PR annotation filtering or limits. Full diagnostics remain in the job log and are captured in cpplint.log for the separate annotation step.
    • Main push validation at 8940d8a passed across 35 tracked C++ source/header files.
    • PR validation for Fix LogMonitor normal-exit shutdown crash #250 also passed across 35 files, including the annotation-reporting step. Neither log contains an annotation-overflow failure.

    The original issue description records the pre-merge state; #235 is now merged and the post-merge results above confirm the resolution.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions