diff --git a/developer-doc/.gitignore b/developer-doc/.gitignore index 81d753315ea314b48f52da9f5b4ee0da2a6139be..7c39bad00200704bb0ed0c3b1345f27edc9e0ed1 100644 --- a/developer-doc/.gitignore +++ b/developer-doc/.gitignore @@ -4,5 +4,6 @@ /automatic /*PP.txt /links-to-user-manual.txt +/plumedcheck.txt /coverage diff --git a/developer-doc/Doxyfile b/developer-doc/Doxyfile index ecee15a5f519d4ebadb7d5b48f5a4a9270264ba4..6377b74034dfbd56a0c036893d89d1555f55cf79 100644 --- a/developer-doc/Doxyfile +++ b/developer-doc/Doxyfile @@ -766,7 +766,8 @@ INPUT = ./Intro.txt \ ./AddingAMeasure.txt \ ./AddingAMultColvar.txt \ ./InstallationLayout.txt \ - ./intro-git.txt + ./intro-git.txt \ + ./plumedcheck.txt # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/developer-doc/Makefile b/developer-doc/Makefile index aa8cbd94ee38c16f3a04eb829006fc6aef4e05c8..e06ef46d03c6b3ebe4f967a6eb1496d1cd3bfc08 100644 --- a/developer-doc/Makefile +++ b/developer-doc/Makefile @@ -13,7 +13,7 @@ ifeq ($(make_doc),yes) endif clean: - rm -fr automatic html latex *~ links-to-user-manual.txt coverage coverage.info + rm -fr automatic html latex *~ links-to-user-manual.txt plumedcheck.txt coverage coverage.info coverage: lcov -c -d ../src/ --output-file coverage.info diff --git a/developer-doc/extract b/developer-doc/extract index b2b803f1815c2211a10c9504ec8a071f10cf9b98..ffad048469cd3dd9965e5e8e552fc2d940e0a939 100755 --- a/developer-doc/extract +++ b/developer-doc/extract @@ -36,6 +36,29 @@ awk ' printf("%s",".html\"> "$2" </a>\n"); }' > links-to-user-manual.txt +cat ../src/maketools/plumedcheck | grep "# DOC:" | +{ +cat << \EOF +// This document is formatted for Doxygen +/** + +EOF + +awk ' +{ + sub("# DOC:",""); + if($0~"^ *:..*: *"){ + print "" + gsub(":","_"); + print + print "" + } else print $0 + +}END{ + printf("%s\n","*/"); +}' +} > plumedcheck.txt + # Create a directory to put all the files in #rm -rf automatic diff --git a/src/maketools/plumedcheck b/src/maketools/plumedcheck index a6c94f835710ff8847e3f779f1517604d6793e61..751a07db36b0d7db9b18261ad9fd3b9d9e5859e0 100755 --- a/src/maketools/plumedcheck +++ b/src/maketools/plumedcheck @@ -1,6 +1,19 @@ #! /bin/bash # vim: ft=awk +# DOC: \page Plumedcheck Validating syntax with plumedcheck +# DOC: +# DOC: Here is a list of coding rules that are enforced by the plumedcheck script. +# DOC: These rules are necessary to be sure that the codebase is consistent. +# DOC: Code not satisfying these rules will make the automatic test on travis-ci fail. +# DOC: In the following we provide a list of errors that are detected automatically, +# DOC: together with a short explanation of the reason we consider these as errors. +# DOC: The names used are the same ones reported by plumedcheck. +# DOC: The `plumedcheck` script can be used as is, but the simplest way to obtain a report +# DOC: is to go to the `buildroot/src` directory and type `make plumedcheck`. +# DOC: In case you think you have a valid reason for a code not passing the check +# DOC: to be merged, please contact the developers. + TEMP=$(mktemp) cat > $TEMP << \EOF