Skip to content

feat: add noPlainDoubleQuantity AST check - #236

Open
galjos wants to merge 6 commits into
devfrom
feature/no-plain-double-quantity
Open

galjos wants to merge 6 commits into
devfrom
feature/no-plain-double-quantity

Conversation

@galjos

@galjos galjos commented Nov 25, 2026

Copy link
Copy Markdown
Member

Closes #230

Flags double/float data members, and containers of them, whose name looks like a physical quantity (energy, force, mass, ...); these should use a typed unit.
PQ include/ has 4 findings; one is a false positive (DihedralParams::frequency is a multiplicity), skipped with allowed_names. src/ adds at least h5mdOutput.cpp timeStep.

🤖 Generated with Claude Code (Opus 5.5)

galjos and others added 3 commits November 25, 2026 22:15
Physical values in data members must use typed quantities, not double.
Origin: Frame::potentialEnergy in PQ #1311.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Handles such as unique_ptr or HDF5 and pybind11 buffers are not values.

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:39
…e-quantity

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

codecov Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.22%. Comparing base (5fba55f) to head (f462a10).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #236      +/-   ##
==========================================
+ Coverage   93.09%   93.22%   +0.13%     
==========================================
  Files          92       93       +1     
  Lines        4155     4237      +82     
==========================================
+ Hits         3868     3950      +82     
  Misses        287      287              
Flag Coverage Δ
unittests 93.22% <100.00%> (+0.13%) ⬆️

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.

…e-quantity

# 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