From 0f2131bf58ee31f97a46fcb652edeba39b313c56 Mon Sep 17 00:00:00 2001
From: Giovanni Bussi <giovanni.bussi@gmail.com>
Date: Mon, 19 Jun 2017 11:09:10 +0200
Subject: [PATCH] ignore codecheck on src/lepton

this could be removed by doing the following:

- applying astyle to src/lepton
- fixing namespace used in src/lepton/*.cpp files
---
 developer-doc/Makefile  | 2 ++
 src/astyle.sh           | 1 +
 src/maketools/codecheck | 4 +++-
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/developer-doc/Makefile b/developer-doc/Makefile
index 61e4e9e96..ab3a9fe04 100644
--- a/developer-doc/Makefile
+++ b/developer-doc/Makefile
@@ -25,4 +25,6 @@ coverage:
 	lcov -r coverage.info "*/lapack/*.cpp" "*/lapack/*.h" -o coverage-tmp.info && mv coverage-tmp.info coverage.info
 # remove internal molfile:
 	lcov -r coverage.info "*/molfile/*.cpp" "*/molfile/*.h" -o coverage-tmp.info && mv coverage-tmp.info coverage.info
+# remove internal lepton:
+	lcov -r coverage.info "*/lepton/*.cpp" "*/lepton/*.h" -o coverage-tmp.info && mv coverage-tmp.info coverage.info
 	genhtml -o coverage -t "plumed test coverage" coverage.info
diff --git a/src/astyle.sh b/src/astyle.sh
index 7c0e30383..b0d3cd0dc 100755
--- a/src/astyle.sh
+++ b/src/astyle.sh
@@ -15,6 +15,7 @@ test -d "$dir" || continue
 test "$dir" = lapack && continue
 test "$dir" = blas && continue
 test "$dir" = molfile && continue
+test "$dir" = lepton && continue
 
 cd $dir
 
diff --git a/src/maketools/codecheck b/src/maketools/codecheck
index d20f56f00..4c59c8349 100755
--- a/src/maketools/codecheck
+++ b/src/maketools/codecheck
@@ -58,7 +58,7 @@ CLEAN_FILE="$TMPDIR/codecheck.clean"
 
 echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
 echo "  In the following analysis we exclude:"
-echo "    src/molfile src/lapack src/blas"
+echo "    src/molfile src/lapack src/blas src/lepton" 
 echo "  since they are full of false positives"
 cat codecheck.log |
  gawk '{
@@ -67,11 +67,13 @@ cat codecheck.log |
     if(match($0,"[[]lapack/")) next;
     if(match($0,"[[]blas/")) next;
     if(match($0,"[[]molfile/")) next;
+    if(match($0,"[[]lepton/")) next;
   } else {
 # with cppcheck we exclude molfile lapack and blas
     if(match($0,"[[]molfile/")) next;
     if(match($0,"[[]lapack/")) next;
     if(match($0,"[[]blas/")) next;
+    if(match($0,"[[]lepton/")) next;
   }
   print
 }' > "${CLEAN_FILE}"
-- 
GitLab