https://github.com/mloskot/clang-tidy-test
Test project for refactoring experiments using clang-tidy autotidy and other
https://github.com/mloskot/clang-tidy-test
autotidy clang-tidy experiments refactoring test-project
Last synced: over 1 year ago
JSON representation
Test project for refactoring experiments using clang-tidy autotidy and other
- Host: GitHub
- URL: https://github.com/mloskot/clang-tidy-test
- Owner: mloskot
- License: unlicense
- Created: 2018-12-16T17:56:42.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-10T21:29:46.000Z (over 7 years ago)
- Last Synced: 2025-02-09T12:20:28.171Z (over 1 year ago)
- Topics: autotidy, clang-tidy, experiments, refactoring, test-project
- Language: C++
- Size: 105 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# clang-tidy-test
Test project for refactoring experiments using [clang-tidy]
and related tools e.g. [autotidy].

## Prerequisites
- C++ compiler
- [CMake]
- [clang-tidy]
- [autotidy]
## Quickstart
1. Run CMake to [generate] clang tooling [compile_commands.json] database
```
cmake -S . -B _build
```
2. Run `clang-tidy/tool/run-clang-tidy.py`
```
run-clang-tidy-7.py -p=_build -header-filter=test/.* > clang-tidy.log 2>&1
```
The script executes [clang-tidy] with the default set of checks on
every translation unit in the [compile_commands.json] and
displays the resulting warnings and errors.
3. Run [autotidy] to start interactive refactoring session based
on previously generated `clang-tidy.log`
```
tidy clang-tidy.log
```
[autotidy]: https://github.com/sasq64/autotidy
[clang-tidy]: http://clang.llvm.org/extra/clang-tidy/
[CMake]: https://cmake.org
[compile_commands.json]: https://clang.llvm.org/docs/JSONCompilationDatabase.html
[generate]: https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html