https://github.com/brettfazio/dimensional-cpp
https://github.com/brettfazio/dimensional-cpp
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/brettfazio/dimensional-cpp
- Owner: brettfazio
- License: apache-2.0
- Created: 2025-01-04T01:47:23.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-01-14T03:03:03.000Z (11 months ago)
- Last Synced: 2025-01-22T14:13:29.044Z (11 months ago)
- Language: C++
- Size: 148 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dimensional-cpp
Clang tidy plugin that provides dimensional analysis for C++. Annotate a variable with a unit like `[[clang::annotate("unit:miles")]]` and the plugin will validate the units during operations.
## make
```bash
cd c/src
cmake .
make
```
## run
```bash
cd c/src
clang-tidy -p=./compile_commands.json --load=./libDimensionalAnalysisCheck.dylib --config-file=./.clang-tidy test.cpp
```
## tests
```bash
make run_tests
```