Bug #3282
Copyright message is not compatible with the clang-format
Description
Addition of the 2020 to the list of years in copyright message makes the line:
* Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019,2020, by the GROMACS development team, led by
too long for clang-format, which changes the paragraph layout and causes the copyright.sh script to fail. Possible solution is to split the line:
* Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by * Copyright (c) 2020, by the GROMACS development team, led by
This can be done manually for the affected files.
Affected patch-sets and files:
https://gerrit.gromacs.org/#/c/gromacs/+/15179/ :
src/gromacs/gmxana/gmx_make_edi.cpp
src/gromacs/gmxana/gmx_sans.cpp
src/gromacs/nbnxm/pairlist.cpp
src/gromacs/nbnxm/pairsearch.h
src/gromacs/tools/make_ndx.cpp
https://gerrit.gromacs.org/#/c/gromacs/+/14385/ :
src/gromacs/ewald/pme_load_balancing.cpp
High priority since we have large changes under review, which need proper solution for this problem.
Associated revisions
History
#1 Updated by Artem Zhmurov about 1 year ago
- Affected version changed from 2021 to git master
#2 Updated by Mark Abraham about 1 year ago
Easiest is to permit the copyright header to recognize the use // clang-format off
beforehand.
Or find creative ways to rename/break apart the file so we can "forget" to preserve historical copyright years of dubious relevance.
#3 Updated by Mark Abraham about 1 year ago
- Status changed from New to Resolved
Applied in changeset 75443f0f3f822c3726763464f406ecc543ad700e.
#4 Updated by Mark Abraham about 1 year ago
- Status changed from Resolved to Closed
- Target version set to 2021-infrastructure-stable
#5 Updated by Mark Abraham about 1 year ago
- Category set to releng
- Assignee set to Mark Abraham
Split lines with many copyright years
The new split_copyright_years.sh script can be run every few years to
keep the line length short enough for readability, and to avoid
clang-format wanting to change the lines such that the copyright
checker no longer recognizes a valid copyright statement.
Numerous files have now been bumped for 2020 because the copyright
line has been changed. That's technically valid.
In recent merge commits, several files were changed to use year ranges
like 2012-2020. Those have been reverted to the old style, which is
thought to be more valid.
Fixes #3282
Change-Id: I9c4e4677bf22a8d48ab1b3245de257c4bbaccf9f