forked from geodynamics/aspect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-tidy
39 lines (34 loc) · 1.69 KB
/
.clang-tidy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Configuration file to be used with clang-tidy
# This file is automatically discovered by clang-tidy when you run it on a
# file in a subdirectory.
#
# This is based on https://github.com/dealii/dealii/blob/master/.clang-tidy
#
# Usage:
#
# see ./contrib/utilities/run_clang_tidy.sh
#
#
#
# alternatively:
#
# set DEAL_II_DIR to an installation made with clang:
#
# export SRC=$PWD
# rm -rf build; mkdir build; cd build
# CXX=clang++ CC=clang cmake -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-fix;-quiet;-header-filter=$(realpath ..)" $SRC
# make -j 4
#
# alternatively (older cmake versions):
# export SRC=$PWD
# rm -rf build; mkdir build; cd build
# cmake -G Ninja -D CMAKE_EXPORT_COMPILE_COMMANDS=ON $SRC
# run-clang-tidy.py -p . -quiet -header-filter="$SRC/include/*"
# Rationale for disabling warnings:
#
# - modernize-concat-nested-namespaces: This is c++17 only.
# - performance-inefficient-string-concatenation: We don't care about "a"+to_string(5)+...
# - performance-no-automatic-move: All modern compiler perform the return value optimization and we prefer to keep things const.
# - modernize-avoid-bind: We use std::bind() in core.cc where replacement doesn't make sense (astyle fails to format)
#
Checks: "-*,cppcoreguidelines-pro-type-static-cast-downcast,google-readability-casting,modernize-*,-modernize-pass-by-value,-modernize-raw-string-literal,-modernize-use-auto,-modernize-use-override,-modernize-use-default-member-init,-modernize-use-transparent-functors,-modernize-use-trailing-return-type,-modernize-use-nodiscard,-modernize-avoid-c-arrays,-modernize-concat-nested-namespaces,use-emplace,mpi-*,performance-*,-performance-inefficient-string-concatenation,-performance-no-automatic-move,-modernize-avoid-bind"