You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by ni...@apache.org on 2022/03/26 04:56:35 UTC

[incubator-heron] branch nicknezis/cppcheck-update created (now 43f0b9a)

This is an automated email from the ASF dual-hosted git repository.

nicknezis pushed a change to branch nicknezis/cppcheck-update
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git.


      at 43f0b9a  Fixed a bug that the new cppcheck helped find

This branch includes the following new commits:

     new 7808e83  Update to cppcheck 2.7
     new 7b0577e  Added some extra filters to ignore files which were incorrectly getting added to the list to scan
     new 43f0b9a  Fixed a bug that the new cppcheck helped find

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[incubator-heron] 01/03: Update to cppcheck 2.7

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nicknezis pushed a commit to branch nicknezis/cppcheck-update
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git

commit 7808e83a5899c89ccfe48e66b51653db8671fbc1
Author: Nicholas Nezis <ni...@gmail.com>
AuthorDate: Sat Mar 26 00:55:03 2022 -0400

    Update to cppcheck 2.7
---
 WORKSPACE                                       |  8 +++-----
 third_party/cppcheck/cppcheck-readdir-fix.patch | 12 ------------
 2 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/WORKSPACE b/WORKSPACE
index 19ec505..5e09596 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -390,11 +390,9 @@ http_archive(
 http_archive(
     name = "com_github_danmar_cppcheck",
     build_file = "@//:third_party/cppcheck/cppcheck.BUILD",
-    patch_args = ["-p2"],
-    patches = ["//third_party/cppcheck:cppcheck-readdir-fix.patch"],
-    sha256 = "cb0e66cbe2d6b655fce430cfaaa74b83ad11c91f221e3926f1ca3211bb7c906b",
-    strip_prefix = "cppcheck-1.90",
-    urls = ["https://github.com/danmar/cppcheck/archive/1.90.zip"],
+    sha256 = "9285bf64af22a07fb24a7431510cc34fba118cf6950190abc2a08c9f7a7084c8",
+    strip_prefix = "cppcheck-2.7",
+    urls = ["https://github.com/danmar/cppcheck/archive/refs/tags/2.7.zip"],
 )
 
 http_archive(
diff --git a/third_party/cppcheck/cppcheck-readdir-fix.patch b/third_party/cppcheck/cppcheck-readdir-fix.patch
deleted file mode 100644
index bde961a..0000000
--- a/third_party/cppcheck/cppcheck-readdir-fix.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur cppcheck/cppcheck-1.90/cli/filelister.cpp cppcheck-fixed/cppcheck-1.90/cli/filelister.cpp
---- cppcheck/cppcheck-1.90/cli/filelister.cpp	2020-02-20 22:42:28.000000000 -0500
-+++ cppcheck-fixed/cppcheck-1.90/cli/filelister.cpp	2020-02-20 22:44:48.000000000 -0500
-@@ -194,7 +194,7 @@
-             std::string new_path;
-             new_path.reserve(path.length() + 100);// prealloc some memory to avoid constant new/deletes in loop
- 
--            while ((readdir_r(dir, &entry, &dir_result) == 0) && (dir_result != nullptr)) {
-+            while ((dir_result = readdir(dir)) != NULL) {
- 
-                 if ((std::strcmp(dir_result->d_name, ".") == 0) ||
-                     (std::strcmp(dir_result->d_name, "..") == 0))

[incubator-heron] 03/03: Fixed a bug that the new cppcheck helped find

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nicknezis pushed a commit to branch nicknezis/cppcheck-update
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git

commit 43f0b9a73ff45414a1594998fd528077c9abdcaa
Author: Nicholas Nezis <ni...@gmail.com>
AuthorDate: Sat Mar 26 00:56:05 2022 -0400

    Fixed a bug that the new cppcheck helped find
---
 heron/stmgr/tests/cpp/server/stmgr_unittest.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/heron/stmgr/tests/cpp/server/stmgr_unittest.cpp b/heron/stmgr/tests/cpp/server/stmgr_unittest.cpp
index 535d56c..58f4e37 100644
--- a/heron/stmgr/tests/cpp/server/stmgr_unittest.cpp
+++ b/heron/stmgr/tests/cpp/server/stmgr_unittest.cpp
@@ -771,7 +771,7 @@ TEST(StMgr, test_pplan_decode) {
               std::find(common.stmgr_ports_.begin(), common.stmgr_ports_.end(),
                         pplan0->stmgrs(i).data_port()));
     EXPECT_NE(common.local_data_ports_.end(),
-              std::find(common.stmgr_ports_.begin(), common.stmgr_ports_.end(),
+              std::find(common.local_data_ports_.begin(), common.local_data_ports_.end(),
                         pplan0->stmgrs(i).local_data_port()));
   }
   EXPECT_EQ(pplan0->instances_size(), common.num_stmgrs_ * num_workers_per_stmgr_);

[incubator-heron] 02/03: Added some extra filters to ignore files which were incorrectly getting added to the list to scan

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nicknezis pushed a commit to branch nicknezis/cppcheck-update
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git

commit 7b0577eae94ee07d786be01f7ec09a784a1939f7
Author: Nicholas Nezis <ni...@gmail.com>
AuthorDate: Sat Mar 26 00:55:43 2022 -0400

    Added some extra filters to ignore files which were incorrectly getting added to the list to scan
---
 tools/java/src/org/apache/bazel/cppcheck/CppCheck.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/java/src/org/apache/bazel/cppcheck/CppCheck.java b/tools/java/src/org/apache/bazel/cppcheck/CppCheck.java
index 6cfa9de..b9bb07d 100644
--- a/tools/java/src/org/apache/bazel/cppcheck/CppCheck.java
+++ b/tools/java/src/org/apache/bazel/cppcheck/CppCheck.java
@@ -135,6 +135,8 @@ public final class CppCheck {
                     Predicates.not(Predicates.containsPattern("external/")),
                     Predicates.not(Predicates.containsPattern("third_party/")),
                     Predicates.not(Predicates.containsPattern("config/heron-config.h")),
+                    Predicates.not(Predicates.containsPattern(".*cppmap")),
+                    Predicates.not(Predicates.containsPattern(".*srcjar")),
                     Predicates.not(Predicates.containsPattern(".*pb.h$")),
                     Predicates.not(Predicates.containsPattern(".*cc_wrapper.sh$")),
                     Predicates.not(Predicates.containsPattern(".*pb.cc$"))