[gnome-builder] copyright: ignore when current year is found
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] copyright: ignore when current year is found
- Date: Tue, 28 Jan 2020 19:48:43 +0000 (UTC)
commit d251f1dceb696b3eaefe38fa87200755475fae77
Author: Christian Hergert <chergert redhat com>
Date: Tue Jan 28 11:48:15 2020 -0800
copyright: ignore when current year is found
src/plugins/copyright/copyright_plugin.py | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/plugins/copyright/copyright_plugin.py b/src/plugins/copyright/copyright_plugin.py
index 387ec09e9..0d7578660 100644
--- a/src/plugins/copyright/copyright_plugin.py
+++ b/src/plugins/copyright/copyright_plugin.py
@@ -78,6 +78,10 @@ class CopyrightBufferAddin(Ide.Object, Ide.BufferAddin):
# Split based on 4-digit years
parts = _YEAR_REGEX.split(text)
+ # Ignore if this year is already represented
+ if year in parts:
+ break
+
# If we have at least 2 years, we can update them
if len(parts) >= 2:
if '-' in parts:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]