[clang-tidy] Add ability to checkout clang-tidy.
This CL adds the DEPS entry to checkout `clang-tidy` if requested
in the `.gclient` config file. A doc is added which gives some
guidance on how to run `clang-tidy`.
Change-Id: I92eeaff33137158ffd17315649fb333c366fc91d
Bug: dawn:1414
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89801
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
diff --git a/.clang-tidy b/.clang-tidy
new file mode 100644
index 0000000..7245011
--- /dev/null
+++ b/.clang-tidy
@@ -0,0 +1,179 @@
+FormatStyle: file
+Checks: "+*,\
+ -bugprone-argument-comment,\
+ -bugprone-branch-clone,\
+ -bugprone-copy-constructor-init,\
+ -bugprone-easily-swappable-parameters,\
+ -bugprone-exception-escape,\
+ -bugprone-fold-init-type,\
+ -bugprone-forward-declaration-namespace,\
+ -bugprone-forwarding-reference-overload,\
+ -bugprone-implicit-widening-of-multiplication-result,\
+ -bugprone-incorrect-roundings,\
+ -bugprone-infinite-loop,\
+ -bugprone-integer-division,\
+ -bugprone-lambda-function-name,\
+ -bugprone-macro-parentheses,\
+ -bugprone-misplaced-widening-cast,\
+ -bugprone-move-forwarding-reference,\
+ -bugprone-multiple-statement-macro,\
+ -bugprone-narrowing-conversions,\
+ -bugprone-not-null-terminated-result,\
+ -bugprone-parent-virtual-call,\
+ -bugprone-redundant-branch-condition,\
+ -bugprone-reserved-identifier,\
+ -bugprone-signed-char-misuse,\
+ -bugprone-sizeof-expression,\
+ -bugprone-string-constructor,\
+ -bugprone-suspicious-enum-usage,\
+ -bugprone-suspicious-include,\
+ -bugprone-suspicious-memory-comparison,\
+ -bugprone-suspicious-string-compare,\
+ -bugprone-terminating-continue,\
+ -bugprone-throw-keyword-missing,\
+ -bugprone-too-small-loop-variable,\
+ -bugprone-undefined-memory-manipulation,\
+ -bugprone-unhandled-self-assignment,\
+ -bugprone-unused-raii,\
+ -bugprone-unused-return-value,\
+ -bugprone-use-after-move,\
+ -bugprone-virtual-near-miss,\
+ -cert-dcl03-c,\
+ -cert-dcl16-c,\
+ -cert-dcl21-cpp,\
+ -cert-dcl50-cpp,\
+ -cert-dcl54-cpp,\
+ -cert-dcl58-cpp,\
+ -cert-dcl59-cpp,\
+ -cert-err09-cpp,\
+ -cert-err33-c,\
+ -cert-err34-c,\
+ -cert-err52-cpp,\
+ -cert-err58-cpp,\
+ -cert-msc30-c,\
+ -cert-msc32-c,\
+ -cert-oop11-cpp,\
+ -cert-oop54-cpp,\
+ -cert-oop57-cpp,\
+ -clang-analyzer-core.CallAndMessage,\
+ -clang-analyzer-core.DivideZero,\
+ -clang-analyzer-core.NonNullParamChecker,\
+ -clang-analyzer-core.NullDereference,\
+ -clang-analyzer-core.UndefinedBinaryOperatorResult,\
+ -clang-analyzer-core.uninitialized.Assign,\
+ -clang-analyzer-core.uninitialized.Branch,\
+ -clang-analyzer-core.uninitialized.UndefReturn,\
+ -clang-analyzer-cplusplus.Move,\
+ -clang-analyzer-cplusplus.NewDelete,\
+ -clang-analyzer-cplusplus.NewDeleteLeaks,\
+ -clang-analyzer-cplusplus.PlacementNew,\
+ -clang-analyzer-deadcode.DeadStores,\
+ -clang-analyzer-optin.cplusplus.UninitializedObject,\
+ -clang-analyzer-optin.cplusplus.VirtualCall,\
+ -clang-analyzer-optin.performance.Padding,\
+ -clang-analyzer-optin.portability.UnixAPI,\
+ -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,\
+ -clang-analyzer-security.insecureAPI.strcpy,\
+ -clang-analyzer-unix.Malloc,\
+ -clang-analyzer-valist.Unterminated,\
+ -concurrency-mt-unsafe,\
+ -google-build-using-namespace,\
+ -google-default-arguments,\
+ -google-explicit-constructor,\
+ -google-global-names-in-headers,\
+ -google-readability-avoid-underscore-in-googletest-name,\
+ -google-readability-braces-around-statements,\
+ -google-readability-casting,\
+ -google-readability-function-size,\
+ -google-readability-namespace-comments,\
+ -google-readability-todo,\
+ -google-runtime-int,\
+ -google-runtime-operator,\
+ -google-upgrade-googletest-case,\
+ -misc-definitions-in-headers,\
+ -misc-misplaced-const,\
+ -misc-non-private-member-variables-in-classes,\
+ -misc-no-recursion,\
+ -misc-redundant-expression,\
+ -misc-unconventional-assign-operator,\
+ -misc-uniqueptr-reset-release,\
+ -misc-unused-parameters,\
+ -misc-unused-using-decls,\
+ -modernize-avoid-bind,\
+ -modernize-avoid-c-arrays,\
+ -modernize-concat-nested-namespaces,\
+ -modernize-deprecated-headers,\
+ -modernize-loop-convert,\
+ -modernize-macro-to-enum,\
+ -modernize-make-shared,\
+ -modernize-make-unique,\
+ -modernize-pass-by-value,\
+ -modernize-raw-string-literal,\
+ -modernize-redundant-void-arg,\
+ -modernize-replace-disallow-copy-and-assign-macro,\
+ -modernize-return-braced-init-list,\
+ -modernize-unary-static-assert,\
+ -modernize-use-auto,\
+ -modernize-use-bool-literals,\
+ -modernize-use-default-member-init,\
+ -modernize-use-emplace,\
+ -modernize-use-equals-default,\
+ -modernize-use-equals-delete,\
+ -modernize-use-nodiscard,\
+ -modernize-use-noexcept,\
+ -modernize-use-nullptr,\
+ -modernize-use-override,\
+ -modernize-use-trailing-return-type,\
+ -modernize-use-transparent-functors,\
+ -modernize-use-using,\
+ -performance-faster-string-find,\
+ -performance-for-range-copy,\
+ -performance-inefficient-algorithm,\
+ -performance-inefficient-string-concatenation,\
+ -performance-inefficient-vector-operation,\
+ -performance-move-const-arg,\
+ -performance-no-automatic-move,\
+ -performance-noexcept-move-constructor,\
+ -performance-no-int-to-ptr,\
+ -performance-trivially-destructible,\
+ -performance-unnecessary-copy-initialization,\
+ -performance-unnecessary-value-param,\
+ -portability-std-allocator-const,\
+ -readability-avoid-const-params-in-decls,\
+ -readability-braces-around-statements,\
+ -readability-const-return-type,\
+ -readability-container-data-pointer,\
+ -readability-container-size-empty,\
+ -readability-convert-member-functions-to-static,\
+ -readability-delete-null-pointer,\
+ -readability-duplicate-include,\
+ -readability-else-after-return,\
+ -readability-function-cognitive-complexity,\
+ -readability-identifier-length,\
+ -readability-identifier-naming,\
+ -readability-implicit-bool-conversion,\
+ -readability-inconsistent-declaration-parameter-name,\
+ -readability-isolate-declaration,\
+ -readability-magic-numbers,\
+ -readability-make-member-function-const,\
+ -readability-misleading-indentation,\
+ -readability-named-parameter,\
+ -readability-non-const-parameter,\
+ -readability-qualified-auto,\
+ -readability-redundant-access-specifiers,\
+ -readability-redundant-control-flow,\
+ -readability-redundant-declaration,\
+ -readability-redundant-member-init,\
+ -readability-redundant-preprocessor,\
+ -readability-redundant-smartptr-get,\
+ -readability-redundant-string-cstr,\
+ -readability-redundant-string-init,\
+ -readability-simplify-boolean-expr,\
+ -readability-simplify-subscript-expr,\
+ -readability-static-accessed-through-instance,\
+ -readability-static-definition-in-anonymous-namespace,\
+ -readability-string-compare,\
+ -readability-suspicious-call-argument,\
+ -readability-uppercase-literal-suffix,\
+ -readability-use-anyofallof,\
+ "