diff options
author | Thomas Haller <thaller@redhat.com> | 2019-10-01 09:20:35 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-10-02 17:03:52 +0200 |
commit | 3b69f02164d20258720b6a06d98a07c0c710e219 (patch) | |
tree | c8b0b68b8a4c355fcea82e006308b3f68756b00c /shared/nm-std-aux | |
parent | a5ca504b5be77ef1fefbb6e8d159377e2b7bbe68 (diff) | |
download | NetworkManager-3b69f02164d20258720b6a06d98a07c0c710e219.tar.gz |
all: unify format of our Copyright source code comments
```bash
readarray -d '' FILES < <(
git ls-files -z \
':(exclude)po' \
':(exclude)shared/c-rbtree' \
':(exclude)shared/c-list' \
':(exclude)shared/c-siphash' \
':(exclude)shared/c-stdaux' \
':(exclude)shared/n-acd' \
':(exclude)shared/n-dhcp4' \
':(exclude)src/systemd/src' \
':(exclude)shared/systemd/src' \
':(exclude)m4' \
':(exclude)COPYING*'
)
sed \
-e 's/^\(--\|#\| \*\) *\(([cC]) *\)\?Copyright \+\(\(([cC])\) \+\)\?\(\(20\|19\)[0-9][0-9]\) *[-–] *\(\(20\|19\)[0-9][0-9]\) \+\([^ ].*\)$/\1 C1pyright#\5 - \7#\9/' \
-e 's/^\(--\|#\| \*\) *\(([cC]) *\)\?Copyright \+\(\(([cC])\) \+\)\?\(\(20\|19\)[0-9][0-9]\) *[,] *\(\(20\|19\)[0-9][0-9]\) \+\([^ ].*\)$/\1 C2pyright#\5, \7#\9/' \
-e 's/^\(--\|#\| \*\) *\(([cC]) *\)\?Copyright \+\(\(([cC])\) \+\)\?\(\(20\|19\)[0-9][0-9]\) \+\([^ ].*\)$/\1 C3pyright#\5#\7/' \
-e 's/^Copyright \(\(20\|19\)[0-9][0-9]\) \+\([^ ].*\)$/C4pyright#\1#\3/' \
-i \
"${FILES[@]}"
echo ">>> untouched Copyright lines"
git grep Copyright "${FILES[@]}"
echo ">>> Copyright lines with unusual extra"
git grep '\<C[0-9]pyright#' "${FILES[@]}" | grep -i reserved
sed \
-e 's/\<C[0-9]pyright#\([^#]*\)#\(.*\)$/Copyright (C) \1 \2/' \
-i \
"${FILES[@]}"
```
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/298
Diffstat (limited to 'shared/nm-std-aux')
-rw-r--r-- | shared/nm-std-aux/c-list-util.c | 2 | ||||
-rw-r--r-- | shared/nm-std-aux/c-list-util.h | 2 | ||||
-rw-r--r-- | shared/nm-std-aux/nm-dbus-compat.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/shared/nm-std-aux/c-list-util.c b/shared/nm-std-aux/c-list-util.c index a49e9f00a4..a6741c4cda 100644 --- a/shared/nm-std-aux/c-list-util.c +++ b/shared/nm-std-aux/c-list-util.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: LGPL-2.1+ /* - * (C) Copyright 2017 Red Hat, Inc. + * Copyright (C) 2017 Red Hat, Inc. */ #include "c-list-util.h" diff --git a/shared/nm-std-aux/c-list-util.h b/shared/nm-std-aux/c-list-util.h index 1c322d2364..d1aaa0b119 100644 --- a/shared/nm-std-aux/c-list-util.h +++ b/shared/nm-std-aux/c-list-util.h @@ -1,6 +1,6 @@ // SPDX-License-Identifier: LGPL-2.1+ /* - * (C) Copyright 2017 Red Hat, Inc. + * Copyright (C) 2017 Red Hat, Inc. */ #ifndef __C_LIST_UTIL_H__ diff --git a/shared/nm-std-aux/nm-dbus-compat.h b/shared/nm-std-aux/nm-dbus-compat.h index b04d145474..bd010f4588 100644 --- a/shared/nm-std-aux/nm-dbus-compat.h +++ b/shared/nm-std-aux/nm-dbus-compat.h @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright 2015 Red Hat, Inc. + * Copyright (C) 2015 Red Hat, Inc. */ #ifndef __NM_DBUS_COMPAT_H__ |