From: Teemu Murtola Date: Sat, 7 Dec 2013 18:37:25 +0000 (+0200) Subject: Suppress remaining errors from copyright script X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=1ef24f05ea3d192698217bfcadf2bffc38008770;p=alexxy%2Fgromacs.git Suppress remaining errors from copyright script - Add a mechanism to the script that allows it to be used only for uncrustification, but not for copyright checking for certain files. - Use the mechanism to suppress copyright checking for thread_mpi files. It's somewhat unclear whether we should just prepend the Gromacs copyright to these files and get rid of this exception, or whether we still are planning to maintain the library separately. But until that is clear, this keeps the script quiet, and the copyright headers need to be manually maintained if desired. - Suppress a few files that don't have any copyright header. - Add copyright header to two source files that were still missing it. With these changes, running admin/copyright.py on all files indicated by .gitattributes only produces messages about outdated copyright years (which it should, for files that have not been modified this year). Part of #818. Change-Id: I2cb09b2b30e782244c16faf02625d405dac642b6 --- diff --git a/.gitattributes b/.gitattributes index 1b6e057703..460b13cbd0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -24,9 +24,14 @@ cmake/*.c.cmakein !filter doxygen/*.cmakein !filter doxygen/*.cpp !filter manual/UseLATEX.cmake !filter +scripts/GMXRC.* !filter +scripts/make_gromos_rtp.py !filter src/contrib/* !filter src/gromacs/gmxlib/gpu_utils/memtestG80_core.h !filter src/gromacs/gmxlib/nonbonded/preprocessor/gmxpreprocess.py !filter +**/thread_mpi/** filter=uncrustify_only +src/gromacs/legacyheaders/thread_mpi.h filter=uncrustify_only +src/gromacs/legacyheaders/tmpi.h filter=uncrustify_only src/gromacs/linearalgebra/gmx_blas/* !filter src/gromacs/linearalgebra/gmx_lapack/* !filter src/gromacs/selection/parser.cpp !filter diff --git a/admin/uncrustify.sh b/admin/uncrustify.sh index cbabff6cfe..bd7c83f71a 100755 --- a/admin/uncrustify.sh +++ b/admin/uncrustify.sh @@ -83,7 +83,8 @@ # set as "uncrustify" (or something ending in "uncrustify") are processed: if # other files have been changed, they are ignored by the script. Files passed # to uncrustify, as well as files with filter "copyright", get their copyright -# header checked. +# header checked. To only run uncrustify for a file, set the filter to +# "uncrustify_only". # # If you want to run uncrustify automatically for changes you make, there are # two options: @@ -197,9 +198,12 @@ cut -f2 <$tmpdir/difflist | \ git check-attr --stdin filter | \ sed -e 's/.*: filter: //' | \ paste $tmpdir/difflist - | \ - grep -E '(uncrustify|copyright)$' >$tmpdir/filtered + grep -E '(uncrustify|uncrustify_only|copyright)$' >$tmpdir/filtered cut -f2 <$tmpdir/filtered >$tmpdir/filelist_all -grep 'uncrustify$' <$tmpdir/filtered | cut -f2 >$tmpdir/filelist_uncrustify +grep -E '(uncrustify|uncrustify_only)$' <$tmpdir/filtered | \ + cut -f2 >$tmpdir/filelist_uncrustify +grep 'copyright$' <$tmpdir/filtered | \ + cut -f2 >$tmpdir/filelist_copyright git diff-files --name-only | grep -Ff $tmpdir/filelist_all >$tmpdir/localmods # Extract changed files to a temporary directory @@ -267,7 +271,7 @@ if [[ $copyright_mode != "off" ]] ; then fi # TODO: Probably better to invoke python explicitly through a customizable # variable. - if ! $admin_dir/copyright.py -F $tmpdir/filelist_all $cpscript_args >>$tmpdir/messages + if ! $admin_dir/copyright.py -F $tmpdir/filelist_copyright $cpscript_args >>$tmpdir/messages then echo "Copyright checking failed!" rm -rf $tmpdir diff --git a/src/gromacs/gmxlib/gmx_random_gausstable.h b/src/gromacs/gmxlib/gmx_random_gausstable.h index 7dcf9ee774..18a3cac6b1 100644 --- a/src/gromacs/gmxlib/gmx_random_gausstable.h +++ b/src/gromacs/gmxlib/gmx_random_gausstable.h @@ -1,4 +1,37 @@ - +/* + * This file is part of the GROMACS molecular simulation package. + * + * Copyright (c) 2004, by the GROMACS development team, led by + * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, + * and including many others, as listed in the AUTHORS file in the + * top-level source directory and at http://www.gromacs.org. + * + * GROMACS is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * GROMACS is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with GROMACS; if not, see + * http://www.gnu.org/licenses, or write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * If you want to redistribute modifications to GROMACS, please + * consider that scientific software is very special. Version + * control is crucial - bugs must be traceable. We will be happy to + * consider code for inclusion in the official distribution, but + * derived work must not be called official GROMACS. Details are found + * in the README & COPYING files - if they are missing, get the + * official version at http://www.gromacs.org. + * + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. + */ /* 14-bit table for fast gaussian lookup. * To be included in gmx_random.c */ diff --git a/src/gromacs/gmxlib/physics_test.c b/src/gromacs/gmxlib/physics_test.c index 0cb4f65f72..7382cd2e71 100644 --- a/src/gromacs/gmxlib/physics_test.c +++ b/src/gromacs/gmxlib/physics_test.c @@ -1,3 +1,37 @@ +/* + * This file is part of the GROMACS molecular simulation package. + * + * Copyright (c) 2010, by the GROMACS development team, led by + * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, + * and including many others, as listed in the AUTHORS file in the + * top-level source directory and at http://www.gromacs.org. + * + * GROMACS is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * GROMACS is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with GROMACS; if not, see + * http://www.gnu.org/licenses, or write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * If you want to redistribute modifications to GROMACS, please + * consider that scientific software is very special. Version + * control is crucial - bugs must be traceable. We will be happy to + * consider code for inclusion in the official distribution, but + * derived work must not be called official GROMACS. Details are found + * in the README & COPYING files - if they are missing, get the + * official version at http://www.gromacs.org. + * + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. + */ #include #include "physics.h"