aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/.clang-tidy
diff options
context:
space:
mode:
authorGravatar Gil <mcg@google.com>2018-04-12 14:54:53 -0700
committerGravatar GitHub <noreply@github.com>2018-04-12 14:54:53 -0700
commit8876622b6fcebc21672bc263666b858b7e152b45 (patch)
tree053fe00a20207099c11c1464df25565a5f5cc3c6 /Firestore/core/.clang-tidy
parent1397e4ae72ea3b8d16a9b44ed1235caca47b3d9e (diff)
Add clang-tidy checks for Firestore (#1078)
* Add a .clang-tidy configuration for Firestore C++ * Fix clang-tidy warnings * typedef -> using * const ref + rvalue ref -> pass by value * NULL -> nullptr * remove useless default initializations * remove useless const value-type parameter declarations (definitions can still use them) * use auto instead of repeating types in a cast * Fix typos * Address use of static method through instance warnings * Address use after move warnings
Diffstat (limited to 'Firestore/core/.clang-tidy')
-rw-r--r--Firestore/core/.clang-tidy34
1 files changed, 34 insertions, 0 deletions
diff --git a/Firestore/core/.clang-tidy b/Firestore/core/.clang-tidy
new file mode 100644
index 0000000..a071105
--- /dev/null
+++ b/Firestore/core/.clang-tidy
@@ -0,0 +1,34 @@
+---
+# cert-*
+# -cert-dcl50-cpp
+# We use variadic functions
+# -cert-err58-cpp
+# GoogleTest creates instances in static scope in a way that trips this
+# warning for every test.
+# readability-*
+# -readability-else-after-return
+# -readability-implicit-bool-conversion
+# These checks generate a bunch of noise that we're just not religious
+# about.
+# modernize-*
+# -modernize-use-equals-default
+# VS 2015 and Xcode <= 8.2 don't fully support this so we don't use
+# `= default`.
+# -modernize-use-equals-delete
+# GoogleTest generates test classes that use the old idiom of making
+# default constructors and operator= private.
+Checks: 'bugprone-*,cert-*,-cert-dcl50-cpp,-cert-err58-cpp,google-*,objc-*,readability-*,-readability-else-after-return,-readability-implicit-bool-conversion,misc-*,modernize-*,-modernize-use-equals-default,-modernize-use-equals-delete,clang-diagnostic-*,clang-analyzer-*'
+WarningsAsErrors: ''
+HeaderFilterRegex: ''
+CheckOptions:
+ - key: readability-braces-around-statements.ShortStatementLines
+ value: '1'
+ - key: google-readability-braces-around-statements.ShortStatementLines
+ value: '1'
+ - key: google-readability-function-size.StatementThreshold
+ value: '800'
+ - key: google-readability-namespace-comments.ShortNamespaceLines
+ value: '10'
+ - key: google-readability-namespace-comments.SpacesBeforeComments
+ value: '2'
+...