Skip to content

feat: add noSingleUseConstexpr AST check - #235

Open
galjos wants to merge 5 commits into
devfrom
feature/no-single-use-constexpr
Open

galjos wants to merge 5 commits into
devfrom
feature/no-single-use-constexpr

Conversation

@galjos

@galjos galjos commented Nov 25, 2026

Copy link
Copy Markdown
Member

Closes #229

Flags namespace-scope constexpr variables in a .cpp file that are used at most max_uses (default 1) times in that file; headers are skipped.
PQ dev has 78 findings in 48 files, mostly single-use ITERATIONS constants in benchmarks. The 7 in testUtils.cpp are unused on purpose, so PQ will need an exclude there.

🤖 Generated with Claude Code (Opus 5.5)

galjos and others added 2 commits November 25, 2026 22:10
Flags namespace-scope constexpr variables in a source file used at
most max_uses (default 1) times there; headers are skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@galjos galjos added the enhancement New feature or request label Nov 25, 2026
@galjos galjos self-assigned this Nov 25, 2026
@galjos
galjos requested a review from 97gamjak November 25, 2026 22:30
…constexpr

# Conflicts:
#	CHANGELOG.md
#	docs/source/sections/ast_checks/index.rst
@codecov

codecov Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.48485% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.17%. Comparing base (5fba55f) to head (79695ed).
⚠️ Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
...c/devops/cpp/ast/checks/no_single_use_constexpr.py 98.46% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #235      +/-   ##
==========================================
+ Coverage   93.09%   93.17%   +0.08%     
==========================================
  Files          92       93       +1     
  Lines        4155     4221      +66     
==========================================
+ Hits         3868     3933      +65     
- Misses        287      288       +1     
Flag Coverage Δ
unittests 93.17% <98.48%> (+0.08%) ⬆️

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…constexpr

# Conflicts:
#	CHANGELOG.md
#	docs/source/sections/ast_checks/index.rst

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant