diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 00000000..080f390b --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,6 @@ +# Use `tools/run-clang-tidy.sh` to run clang-tidy with the correct config +Checks: 'bugprone-*,concurrency-*,clang-analyzer-*,-clang-diagnostic-missing-braces' +InheritParentConfig: false +FormatStyle: file +HeaderFilterRegex: '' +WarningsAsErrors: '' diff --git a/tools/run-clang-tidy.sh b/tools/run-clang-tidy.sh new file mode 100755 index 00000000..489a0093 --- /dev/null +++ b/tools/run-clang-tidy.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# +# Run clang-tidy on our code, with the correct compiler options set (since it +# doesn't seem to extract those from the compilation database) +# +# TODO: There are a few use-after-move warning for the error codes in Boost's +# library code. Is there any way to silence these? + +set -euo pipefail + +# This is the repository's root +cd "$(dirname "$0")/.." + +exec run-clang-tidy -p build \ + -extra-arg='-m64' \ + -extra-arg='-std=c++2a' \ + -extra-arg='-I/usr/include/wine' \ + src/{common,plugin,wine-host}