#20 add clang-tidy linting to cmake

This commit is contained in:
James H
2022-01-03 15:12:18 +00:00
parent 0b3ca62c4c
commit a5e5f0f90d
3 changed files with 6 additions and 10 deletions

View File

@@ -26,7 +26,7 @@ build-job: # This job runs in the build stage, which runs first.
- linux
before_script:
- apt update
- apt install -y build-essential cmake libgtkmm-3.0-dev
- apt install -y build-essential cmake libgtkmm-3.0-dev clang-tidy
script:
- echo "Configuring"
- cmake -B build .
@@ -43,15 +43,6 @@ build-job: # This job runs in the build stage, which runs first.
# - sleep 60
# - echo "Code coverage is 90%"
# lint-test-job: # This job also runs in the test stage.
# stage: test # It can run at the same time as unit-test-job (in parallel).
# tags:
# - linux
# script:
# - echo "Linting code... This will take about 10 seconds."
# - sleep 10
# - echo "No lint issues found."
# deploy-job: # This job runs in the deploy stage.
# stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
# tags:

View File

@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.10)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_CLANG_TIDY clang-tidy -checks=-*,bugprone-*,concurrency-*,cppcoreguidelines-*,modernize-*,performance-*,readability-*,)
project(PiCamera)
# Find gtk+-4.0 library

View File

@@ -6,6 +6,9 @@ Requirements:
```
cmake
libgtkmm-3.0-dev
Optionally:
- clang-tidy
```
Then: