Skip to content

fix: use named constants for parseGpgColonOutput boolean args#920

Merged
nogeenharrie merged 1 commit intomainfrom
fix/boolean-clarity-gpgkeystate
Apr 7, 2026
Merged

fix: use named constants for parseGpgColonOutput boolean args#920
nogeenharrie merged 1 commit intomainfrom
fix/boolean-clarity-gpgkeystate

Conversation

@nogeenharrie
Copy link
Copy Markdown
Contributor

@nogeenharrie nogeenharrie commented Apr 7, 2026

Summary

  • Replace ambiguous boolean literals with named constants for clarity
  • → where

Found via GitHub AI-powered bug detection.

Summary by CodeRabbit

  • Tests
    • Refactored test cases to improve code clarity and consistency in how parameters are passed to test functions.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 92d851b2-5375-43d7-a1d3-b0b500304b13

📥 Commits

Reviewing files that changed from the base of the PR and between b28a43e and fbaa33b.

📒 Files selected for processing (1)
  • tests/auto/gpgkeystate/tst_gpgkeystate.cpp

📝 Walkthrough

Walkthrough

Test cases for parseGpgColonOutput have been refactored to use local const bool includeSecretKeys variables instead of passing literal boolean values directly to the function call, maintaining existing behavior while standardizing the call-site pattern across multiple test methods.

Changes

Cohort / File(s) Summary
Test refactoring
tests/auto/gpgkeystate/tst_gpgkeystate.cpp
Introduced local const bool includeSecretKeys variables in four test cases (parseMultiKeyPublic, parseSingleKey, parseKeyRollover, parseSecretKeys) and refactored function calls to pass the variable instead of inline boolean literals.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

🐰 A rabbit's refactoring rhyme:

Variables dance where literals played,
Test calls grow clean in this parade,
No logic shifts, just style refined—
Readability blooms, a beautiful bind! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: replacing boolean literals with named constants in parseGpgColonOutput function calls for improved code clarity.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/boolean-clarity-gpgkeystate

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

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 21.044%. remained the same — fix/boolean-clarity-gpgkeystate into main

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 27.22%. Comparing base (b28a43e) to head (fbaa33b).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #920   +/-   ##
=======================================
  Coverage   27.22%   27.22%           
=======================================
  Files          39       39           
  Lines        3247     3247           
=======================================
  Hits          884      884           
  Misses       2363     2363           
Flag Coverage Δ
qtpass 27.22% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nogeenharrie nogeenharrie merged commit 9a676b2 into main Apr 7, 2026
26 checks passed
@nogeenharrie nogeenharrie deleted the fix/boolean-clarity-gpgkeystate branch April 7, 2026 23:47
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.

3 participants