From eaf7aff03efe9f27745d3c742686f62ff1295a92 Mon Sep 17 00:00:00 2001 From: Joseph Walton-Rivers <joseph@walton-rivers.uk> Date: Thu, 29 Jul 2021 08:36:15 +0100 Subject: [PATCH] Add clang tidy to build. This is only a first approxmiation of what I would like for CI. Ideally, it'd be it's own step that can pass/fail regardless of the build status. With this setup, it's integrated into the build (and also running tidy over our vendored dependencies, which are outside our scope). Something like this: http://www.stablecoder.ca/2018/10/30/full-cmake-helper-suite.html might be better for the future... --- CMakeLists.txt | 2 ++ fggl/gfx/input.cpp | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 92de355..d8bea12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,6 @@ cmake_minimum_required(VERSION 3.10) + project(FGGL VERSION 0.1 LANGUAGES CXX) # Set C++ version @@ -11,6 +12,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) add_subdirectory(vendor/imgui/) # engine +set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=*") add_subdirectory(fggl) # extras diff --git a/fggl/gfx/input.cpp b/fggl/gfx/input.cpp index 09d8df8..8be1ecb 100644 --- a/fggl/gfx/input.cpp +++ b/fggl/gfx/input.cpp @@ -39,7 +39,6 @@ void Input::frame() { } void Input::mousePos(double x, double y) { - assert( m_mouse_curr.cursor != nullptr ); m_mouse_curr.cursor[0] = x; m_mouse_curr.cursor[1] = y; } -- GitLab