Add support for clang-tidy and clang-format

This commit is contained in:
Vyn 2024-04-13 11:47:52 +02:00
parent 2bb7fcfcc6
commit 081e107b9b
4 changed files with 13 additions and 0 deletions

9
.clang-format Normal file
View file

@ -0,0 +1,9 @@
UseTab: Always
IndentWidth: 4
TabWidth: 4
ColumnLimit: 100
BreakBeforeBraces: Linux
SeparateDefinitionBlocks: Always
AllowShortBlocksOnASingleLine: Never
AllowShortIfStatementsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None

1
.clang-tidy Normal file
View file

@ -0,0 +1 @@
Checks: "-*,cppcoreguidelines-*,readability-braces-around-statements"

1
.gitignore vendored
View file

@ -3,3 +3,4 @@ todo.txt
todo.md
.qmlls.ini
.clangd
.cache

View file

@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 3.16)
project(Mirai VERSION 1.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
find_package(Qt6 6.6 REQUIRED COMPONENTS Quick)