Skip to content

fix(OSQUERY-008): CU-86akhf8u2 File-scope constant kMaxEventLatency violates established kPascalCase-only scoping/anonymous-namespace convention - #103

Draft
flamingo[bot] wants to merge 1 commit into
masterfrom
ai-fix/osquery-008-88ee779b-46e37628
Draft

flamingo[bot] wants to merge 1 commit into
masterfrom
ai-fix/osquery-008-88ee779b-46e37628

Conversation

@flamingo

@flamingo flamingo Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Closes findings from rule OSQUERY-008 — File-scope constant kMaxEventLatency violates established kPascalCase-only scoping/anonymous-namespace convention.

Draft — this is a starting point, not a finished change. The fix required judgment, so read it before trusting it.

# Fix confidence Finding Location
1 🟢 95 high File-scope constant kMaxEventLatency violates established kPascalCase-only scoping/anonymous-namespace convention osquery/events/tests/linux/inotify_tests.cpp:32

What changed — and what was deliberately left — is explained per finding as inline review comments on the lines each finding touched.


Run: https://product-hub.flamingo.so/admin/code-review
Run id: 46e37628-c6c9-49a4-aa29-9b30b2c8be3f

Merging this PR is recorded as acceptance of the rule that produced it;
closing it unmerged is recorded as rejection. Both feed rule health, so
closing a wrong suggestion is useful rather than merely tidy.

ClickUp task: CU-86akhf8u2 Osquery review findings sweep (15 PRs)

…lished kPascalCase-only scoping/anonymous-namespace convention

@flamingo flamingo Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 What this fix changed, finding by finding

1 finding(s) fixed in this draft — 1 explained inline on the diff.

DECLARE_bool(enable_file_events);

namespace {
const int kMaxEventLatency = 3000;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 🟠 File-scope constant kMaxEventLatency violates established kPascalCase-only scoping/anonymous-namespace convention

Wrapped const int kMaxEventLatency = 3000; in an anonymous namespace (namespace { ... } // namespace) directly where it was declared inside namespace osquery, giving it internal linkage per translation unit and satisfying OSQUERY-007 scoping convention while preserving its use in all subsequent TEST_F bodies unchanged.

🤖 Prompt for AI agents
In osquery/events/tests/linux/inotify_tests.cpp around line 32, review and complete this code-review fix: File-scope constant kMaxEventLatency violates established kPascalCase-only scoping/anonymous-namespace convention.
What the draft fix changed: Wrapped `const int kMaxEventLatency = 3000;` in an anonymous namespace (`namespace { ... } // namespace`) directly where it was declared inside `namespace osquery`, giving it internal linkage per translation unit and satisfying OSQUERY-007 scoping convention while preserving its use in all subsequent `TEST_F` bodies unchanged.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟢 95 high — react 👍/👎 to teach the reviewer

@flamingo flamingo Bot changed the title fix(OSQUERY-008): File-scope constant kMaxEventLatency violates established kPascalCase-only scoping/anonymous-namespace convention fix(OSQUERY-008): CU-86akhf8u2 File-scope constant kMaxEventLatency violates established kPascalCase-only scoping/anonymous-namespace convention Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants