clang-tidy: Enable a clang-analyzer and readability check
This commit enables clang-analyzer-deadcode.DeadStores check
which indicates that there are variables in your code that are
assigned values but are never used beyond that assignment.
The readability-static-accessed-through-instance check verifies
when a static member of a class is accessed through an instance
of that class rather than through the class itself.
But here this check is capturing an error on "serviceName"
even when the member is a constant and not a static member.
So just ignoring this check in the function.
Change-Id: I18b60a0800870ac8394f5a0754fbbac0cfd18c36
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/.clang-tidy b/.clang-tidy
index 89403ad..e3c8194 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -119,6 +119,7 @@
clang-analyzer-cplusplus.SelfAssignment,
clang-analyzer-cplusplus.SmartPtrModeling,
clang-analyzer-cplusplus.VirtualCallModeling,
+clang-analyzer-deadcode.DeadStores,
clang-analyzer-fuchsia.HandleChecker,
clang-analyzer-nullability.NullPassedToNonnull,
clang-analyzer-nullability.NullReturnedFromNonnull,
@@ -251,6 +252,7 @@
readability-redundant-string-cstr,
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,