Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Checks: >-
-*,
bugprone-*,
clang-analyzer-*,
performance-*,
portability-*
WarningsAsErrors: '*'
4 changes: 4 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ jobs:
- name: Lint CMake files
run: ./scripts/lint.sh cmake-lint

- name: Run clang-tidy
working-directory: ctprintf
run: cmake --workflow --fresh --preset clang-tidy-workflow

- name: Configure, build, and test
working-directory: ctprintf
run: cmake --workflow --preset release-workflow
Expand Down
26 changes: 26 additions & 0 deletions ctprintf/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
},
{
"name": "clang-tidy",
"displayName": "clang-tidy",
"inherits": "debug",
"cacheVariables": {
"CMAKE_CXX_CLANG_TIDY": "clang-tidy;--warnings-as-errors=*"
}
}
],
"buildPresets": [
Expand All @@ -37,6 +45,10 @@
{
"name": "release",
"configurePreset": "release"
},
{
"name": "clang-tidy",
"configurePreset": "clang-tidy"
}
],
"testPresets": [
Expand Down Expand Up @@ -109,6 +121,20 @@
"name": "release"
}
]
},
{
"name": "clang-tidy-workflow",
"displayName": "clang-tidy: configure and build",
"steps": [
{
"type": "configure",
"name": "clang-tidy"
},
{
"type": "build",
"name": "clang-tidy"
}
]
}
]
}
1 change: 1 addition & 0 deletions scripts/build-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends \
build-essential \
clang-format \
clang-tidy \
cmake \
debhelper \
devscripts \
Expand Down
Loading