summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormikhnenko <[email protected]>2025-10-22 19:09:00 +0300
committermikhnenko <[email protected]>2025-10-22 19:53:31 +0300
commitcbb542ed10ea73da790c776bef7ca79dcd7d16cc (patch)
tree969fb6444bb8a6b8dd9dd3553bc90755efcdbc0a
parent9af9e1f3bcda227b87ea8cd4f9e3ff8e5ec728f9 (diff)
Add NOLINT into contribs for clang-tidy support
commit_hash:0aa0f2a11902c2024bb5318ea6fd5d8bd8e1cb1c
-rw-r--r--contrib/restricted/boost/property_tree/include/boost/property_tree/json_parser/detail/parser.hpp2
-rw-r--r--contrib/restricted/boost/property_tree/patches/no-lint-clang-analyzer-optin.cplusplus.UninitializedObject.sh10
-rw-r--r--contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher.hpp2
-rw-r--r--contrib/restricted/boost/regex/patches/no-lint-clang-analyzer-optin.cplusplus.UninitializedObject.sh10
-rw-r--r--contrib/restricted/boost/serialization/include/boost/serialization/version.hpp4
-rw-r--r--contrib/restricted/boost/serialization/patches/no-lint.sh9
-rw-r--r--contrib/restricted/googletest/googlemock/include/gmock/gmock-actions.h6
-rw-r--r--contrib/restricted/googletest/googlemock/include/gmock/gmock-matchers.h6
-rw-r--r--contrib/restricted/googletest/googletest/include/gtest/internal/gtest-internal.h8
9 files changed, 43 insertions, 14 deletions
diff --git a/contrib/restricted/boost/property_tree/include/boost/property_tree/json_parser/detail/parser.hpp b/contrib/restricted/boost/property_tree/include/boost/property_tree/json_parser/detail/parser.hpp
index 164f1baedea..5566a75015a 100644
--- a/contrib/restricted/boost/property_tree/include/boost/property_tree/json_parser/detail/parser.hpp
+++ b/contrib/restricted/boost/property_tree/include/boost/property_tree/json_parser/detail/parser.hpp
@@ -239,7 +239,7 @@ namespace boost { namespace property_tree {
public:
parser(Callbacks& callbacks, Encoding& encoding)
- : callbacks(callbacks), encoding(encoding), src(encoding)
+ : callbacks(callbacks), encoding(encoding), src(encoding) /* NOLINT(clang-analyzer-optin.cplusplus.UninitializedObject) */
{}
template <typename Range>
diff --git a/contrib/restricted/boost/property_tree/patches/no-lint-clang-analyzer-optin.cplusplus.UninitializedObject.sh b/contrib/restricted/boost/property_tree/patches/no-lint-clang-analyzer-optin.cplusplus.UninitializedObject.sh
new file mode 100644
index 00000000000..3590742ac5c
--- /dev/null
+++ b/contrib/restricted/boost/property_tree/patches/no-lint-clang-analyzer-optin.cplusplus.UninitializedObject.sh
@@ -0,0 +1,10 @@
+set -xue
+
+add_nolint_to()
+{
+ search_text=$(echo "$1" | sed 's/[\/&]/\\&/g')
+ pattern='/'${search_text}'/s/$/ \/* NOLINT(clang-analyzer-optin.cplusplus.UninitializedObject) *\//'
+ sed -i "$pattern" "$2"
+}
+
+add_nolint_to "callbacks(callbacks), encoding(encoding), src(encoding)" include/boost/property_tree/json_parser/detail/parser.hpp
diff --git a/contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher.hpp b/contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher.hpp
index 8e600dba4b5..e66b2b840d5 100644
--- a/contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher.hpp
+++ b/contrib/restricted/boost/regex/include/boost/regex/v5/perl_matcher.hpp
@@ -386,7 +386,7 @@ public:
m_independent(false), next_count(&rep_obj), rep_obj(&next_count)
, m_recursions(0)
{
- construct_init(e, f);
+ construct_init(e, f); /* NOLINT(clang-analyzer-optin.cplusplus.UninitializedObject) */
}
bool match();
diff --git a/contrib/restricted/boost/regex/patches/no-lint-clang-analyzer-optin.cplusplus.UninitializedObject.sh b/contrib/restricted/boost/regex/patches/no-lint-clang-analyzer-optin.cplusplus.UninitializedObject.sh
new file mode 100644
index 00000000000..80b88990d78
--- /dev/null
+++ b/contrib/restricted/boost/regex/patches/no-lint-clang-analyzer-optin.cplusplus.UninitializedObject.sh
@@ -0,0 +1,10 @@
+set -xue
+
+add_nolint_to()
+{
+ search_text=$(echo "$1" | sed 's/[\/&]/\\&/g')
+ pattern='/'${search_text}'/s/$/ \/* NOLINT(clang-analyzer-optin.cplusplus.UninitializedObject) *\//'
+ sed -i "$pattern" "$2"
+}
+
+add_nolint_to "construct_init(e, f);" include/boost/regex/v5/perl_matcher.hpp
diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/version.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/version.hpp
index 076c859e3f2..989af46a9ce 100644
--- a/contrib/restricted/boost/serialization/include/boost/serialization/version.hpp
+++ b/contrib/restricted/boost/serialization/include/boost/serialization/version.hpp
@@ -49,7 +49,7 @@ struct version
traits_class_version< T >,
mpl::int_<0>
>::type type;
- BOOST_STATIC_CONSTANT(int, value = version::type::value);
+ BOOST_STATIC_CONSTANT(int, value = version::type::value); /* NOLINT */
};
#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
@@ -83,7 +83,7 @@ struct version<T > \
{ \
typedef mpl::int_<N> type; \
typedef mpl::integral_c_tag tag; \
- BOOST_STATIC_CONSTANT(int, value = version::type::value); \
+ BOOST_STATIC_CONSTANT(int, value = version::type::value); /* NOLINT */ \
BOOST_MPL_ASSERT(( \
boost::mpl::less< \
boost::mpl::int_<N>, \
diff --git a/contrib/restricted/boost/serialization/patches/no-lint.sh b/contrib/restricted/boost/serialization/patches/no-lint.sh
new file mode 100644
index 00000000000..0643c2c1d3e
--- /dev/null
+++ b/contrib/restricted/boost/serialization/patches/no-lint.sh
@@ -0,0 +1,9 @@
+set -xue
+
+add_nolint_to()
+{
+ expr='s|'${1}'|'${1}' /* NOLINT */|g'
+ sed "${expr}" -i ${2}
+}
+
+add_nolint_to "BOOST_STATIC_CONSTANT(int, value = version::type::value);" include/boost/serialization/version.hpp
diff --git a/contrib/restricted/googletest/googlemock/include/gmock/gmock-actions.h b/contrib/restricted/googletest/googlemock/include/gmock/gmock-actions.h
index 5fe50e3d8e3..25379878189 100644
--- a/contrib/restricted/googletest/googlemock/include/gmock/gmock-actions.h
+++ b/contrib/restricted/googletest/googlemock/include/gmock/gmock-actions.h
@@ -2293,7 +2293,7 @@ template <typename F, typename Impl>
#define GMOCK_ACTION_INIT_PARAMS_(params) \
GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_INIT_PARAM, , params))
-#define GMOCK_INTERNAL_FIELD_PARAM(i, data, param) param##_type param;
+#define GMOCK_INTERNAL_FIELD_PARAM(i, data, param) param##_type param; // NOLINT(readability-identifier-naming)
#define GMOCK_ACTION_FIELD_PARAMS_(params) \
GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_FIELD_PARAM, , params)
@@ -2324,10 +2324,10 @@ template <typename F, typename Impl>
std::shared_ptr<const gmock_Impl> impl_; \
}; \
template <GMOCK_ACTION_TYPENAME_PARAMS_(params)> \
- [[nodiscard]] inline full_name<GMOCK_ACTION_TYPE_PARAMS_(params)> name( \
+ [[nodiscard]] inline full_name<GMOCK_ACTION_TYPE_PARAMS_(params)> name( /* NOLINT */\
GMOCK_ACTION_TYPE_GVALUE_PARAMS_(params)); \
template <GMOCK_ACTION_TYPENAME_PARAMS_(params)> \
- inline full_name<GMOCK_ACTION_TYPE_PARAMS_(params)> name( \
+ inline full_name<GMOCK_ACTION_TYPE_PARAMS_(params)> name( /* NOLINT */\
GMOCK_ACTION_TYPE_GVALUE_PARAMS_(params)) { \
return full_name<GMOCK_ACTION_TYPE_PARAMS_(params)>( \
GMOCK_ACTION_GVALUE_PARAMS_(params)); \
diff --git a/contrib/restricted/googletest/googlemock/include/gmock/gmock-matchers.h b/contrib/restricted/googletest/googlemock/include/gmock/gmock-matchers.h
index a8c1f95f313..89a4bdff8a7 100644
--- a/contrib/restricted/googletest/googlemock/include/gmock/gmock-matchers.h
+++ b/contrib/restricted/googletest/googlemock/include/gmock/gmock-matchers.h
@@ -5747,7 +5747,7 @@ PolymorphicMatcher<internal::ExceptionMatcherImpl<Err>> ThrowsMessage(
inline name##Matcher GMOCK_INTERNAL_WARNING_PUSH() \
GMOCK_INTERNAL_WARNING_CLANG(ignored, "-Wunused-function") \
GMOCK_INTERNAL_WARNING_CLANG(ignored, "-Wunused-member-function") \
- name GMOCK_INTERNAL_WARNING_POP()() { \
+ name GMOCK_INTERNAL_WARNING_POP()() { /* NOLINT(readability-identifier-naming) */ \
return {}; \
} \
template <typename arg_type> \
@@ -5828,7 +5828,7 @@ PolymorphicMatcher<internal::ExceptionMatcherImpl<Err>> ThrowsMessage(
}; \
}; \
template <GMOCK_INTERNAL_MATCHER_TEMPLATE_PARAMS(args)> \
- inline full_name<GMOCK_INTERNAL_MATCHER_TYPE_PARAMS(args)> name( \
+ inline full_name<GMOCK_INTERNAL_MATCHER_TYPE_PARAMS(args)> name( /* NOLINT(readability-identifier-naming) */\
GMOCK_INTERNAL_MATCHER_FUNCTION_ARGS(args)) { \
return full_name<GMOCK_INTERNAL_MATCHER_TYPE_PARAMS(args)>( \
GMOCK_INTERNAL_MATCHER_ARGS_USAGE(args)); \
@@ -5866,7 +5866,7 @@ PolymorphicMatcher<internal::ExceptionMatcherImpl<Err>> ThrowsMessage(
#define GMOCK_INTERNAL_MATCHER_MEMBERS(args) \
GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_MATCHER_MEMBER, , args)
#define GMOCK_INTERNAL_MATCHER_MEMBER(i_unused, data_unused, arg) \
- const arg##_type arg;
+ const arg##_type arg; // NOLINT(readability-identifier-naming)
#define GMOCK_INTERNAL_MATCHER_MEMBERS_USAGE(args) \
GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_MATCHER_MEMBER_USAGE, , args))
diff --git a/contrib/restricted/googletest/googletest/include/gtest/internal/gtest-internal.h b/contrib/restricted/googletest/googletest/include/gtest/internal/gtest-internal.h
index d463b27d5e4..ca795c0936a 100644
--- a/contrib/restricted/googletest/googletest/include/gtest/internal/gtest-internal.h
+++ b/contrib/restricted/googletest/googletest/include/gtest/internal/gtest-internal.h
@@ -1361,8 +1361,8 @@ class NeverThrown {
#define GTEST_TEST_THROW_(statement, expected_exception, fail) \
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::TrueWithString gtest_msg{}) { \
- bool gtest_caught_expected = false; \
+ if (::testing::internal::TrueWithString gtest_msg{}) { /* NOLINT */\
+ bool gtest_caught_expected = false; /* NOLINT */\
try { \
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
} catch (expected_exception const&) { \
@@ -1408,7 +1408,7 @@ class NeverThrown {
#define GTEST_TEST_NO_THROW_(statement, fail) \
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::TrueWithString gtest_msg{}) { \
+ if (::testing::internal::TrueWithString gtest_msg{}) { /*NOLINT*/\
try { \
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
} \
@@ -1449,7 +1449,7 @@ class NeverThrown {
// representation of expression as it was passed into the EXPECT_TRUE.
#define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail) \
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (const ::testing::AssertionResult gtest_ar_ = \
+ if (const ::testing::AssertionResult gtest_ar_ = /* NOLINT */\
::testing::AssertionResult(expression)) \
; \
else \