From 5d3cdf0e2575594ec8b1648117dbd8b879711fe9 Mon Sep 17 00:00:00 2001 From: Paul Bauer Date: Fri, 17 Apr 2020 10:05:10 +0000 Subject: [PATCH] Fix check source not parsing errors and warnings correctly Fixes #3487 Change-Id: I6161e02f66a9c34a56a7475f986ab94a5cc83d91 --- admin/gitlab-ci/lint.gitlab-ci.yml | 5 +++-- src/gromacs/domdec/utility.h | 2 +- src/gromacs/imd/imd.cpp | 2 +- src/gromacs/selection/compiler.cpp | 12 ------------ src/gromacs/selection/compiler.h | 11 +++++++++++ src/gromacs/selection/selectioncollection.h | 10 +++------- 6 files changed, 19 insertions(+), 23 deletions(-) diff --git a/admin/gitlab-ci/lint.gitlab-ci.yml b/admin/gitlab-ci/lint.gitlab-ci.yml index 03343bbcee..21a7003e0a 100644 --- a/admin/gitlab-ci/lint.gitlab-ci.yml +++ b/admin/gitlab-ci/lint.gitlab-ci.yml @@ -140,8 +140,9 @@ check-source: script: - cd $BUILD_DIR - cmake --build . --target check-source - - grep -qi "error" docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee doxygenError.txt || true - - grep -qi "warning" docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee -a doxygenError.txt || true + - awk '/warning.*include style.*order/,/You can use.*rst|^$/' docs/doxygen/check-source.log | tee doxygenError.txt || true + - awk '/Traceback/,/.*rror|^$/' docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee -a doxygenError.txt || true + - awk '/warning:/,/in doxygen.*|^$/' docs/doxygen/doxygen*log | tee -a doxygenError.txt || true - if [ -s doxygenError.txt ] ; then echo "Found errors while running doxygen"; exit 1; fi artifacts: name: docs-artifacts-$CI_COMMIT_REF_SLUG diff --git a/src/gromacs/domdec/utility.h b/src/gromacs/domdec/utility.h index 4e36029e2e..89e804aaf6 100644 --- a/src/gromacs/domdec/utility.h +++ b/src/gromacs/domdec/utility.h @@ -42,9 +42,9 @@ #ifndef GMX_DOMDEC_DOMDEC_UTILITY_H #define GMX_DOMDEC_DOMDEC_UTILITY_H +#include "gromacs/math/vectypes.h" #include "gromacs/mdtypes/forcerec.h" #include "gromacs/utility/arrayref.h" -#include "gromacs/math/vectypes.h" #include "domdec_internal.h" diff --git a/src/gromacs/imd/imd.cpp b/src/gromacs/imd/imd.cpp index 9c84d7718b..6b5d3d28f4 100644 --- a/src/gromacs/imd/imd.cpp +++ b/src/gromacs/imd/imd.cpp @@ -71,12 +71,12 @@ #include "gromacs/mdlib/stat.h" #include "gromacs/mdrunutility/handlerestart.h" #include "gromacs/mdrunutility/multisim.h" +#include "gromacs/mdtypes/commrec.h" #include "gromacs/mdtypes/enerdata.h" #include "gromacs/mdtypes/imdmodule.h" #include "gromacs/mdtypes/inputrec.h" #include "gromacs/mdtypes/md_enums.h" #include "gromacs/mdtypes/mdrunoptions.h" -#include "gromacs/mdtypes/commrec.h" #include "gromacs/mdtypes/state.h" #include "gromacs/pbcutil/pbc.h" #include "gromacs/timing/wallcycle.h" diff --git a/src/gromacs/selection/compiler.cpp b/src/gromacs/selection/compiler.cpp index bf9fd86f9a..52a26628d9 100644 --- a/src/gromacs/selection/compiler.cpp +++ b/src/gromacs/selection/compiler.cpp @@ -2586,18 +2586,6 @@ static void free_item_compilerdata(const SelectionTreeElementPointer& sel) namespace gmx { -/*! - * \param[in,out] coll Selection collection to be compiled. - * - * Before compilation, the selection collection should have been initialized - * with gmx_ana_selcollection_parse_*(). - * The compiled selection collection can be passed to - * gmx_ana_selcollection_evaluate() to evaluate the selection for a frame. - * If an error occurs, \p sc is cleared. - * - * The covered fraction information in \p sc is initialized to - * \ref CFRAC_NONE. - */ void compileSelection(SelectionCollection* coll) { gmx_ana_selcollection_t* sc = &coll->impl_->sc_; diff --git a/src/gromacs/selection/compiler.h b/src/gromacs/selection/compiler.h index 6602835a75..97c9fb99f8 100644 --- a/src/gromacs/selection/compiler.h +++ b/src/gromacs/selection/compiler.h @@ -55,8 +55,19 @@ class SelectionCollection; * It prepares the selections in a selection collection for evaluation and * performs some optimizations. * + * Before compilation, the selection collection should have been initialized + * with gmx_ana_selcollection_parse_*(). + * The compiled selection collection can be passed to + * gmx_ana_selcollection_evaluate() to evaluate the selection for a frame. + * If an error occurs, \p coll is cleared. + * + * The covered fraction information in \p coll is initialized to + * \ref CFRAC_NONE. + * * See \ref page_module_selection_compiler. * + * \param[in, out] coll Selection collection to work on. + * * \ingroup module_selection */ void compileSelection(SelectionCollection* coll); diff --git a/src/gromacs/selection/selectioncollection.h b/src/gromacs/selection/selectioncollection.h index 886bb898a0..a168aaa1b2 100644 --- a/src/gromacs/selection/selectioncollection.h +++ b/src/gromacs/selection/selectioncollection.h @@ -416,13 +416,9 @@ private: PrivateImplPointer impl_; - /*! \brief - * Needed for the compiler to freely modify the collection. - */ - friend void compileSelection(SelectionCollection* /*coll*/); - /*! \brief - * Needed for the evaluator to freely modify the collection. - */ + // Needed for the compiler to freely modify the collection. + friend void compileSelection(SelectionCollection* coll); + // Needed for the evaluator to freely modify the collection. friend class SelectionEvaluator; }; -- 2.22.0