From 45cbe1b7c85f7b02c4c293a218056c00f76d3418 Mon Sep 17 00:00:00 2001 From: Simon Bernard Date: Thu, 13 Oct 2022 09:53:51 +0200 Subject: [PATCH] GH-1322: Add Checkstyle rule to ensure Java files get right header --- eclipse/checkstyle.xml | 6 ++++++ eclipse/java.header | 15 +++++++++++++++ leshan-core/pom.xml | 6 ++++++ 3 files changed, 27 insertions(+) create mode 100644 eclipse/java.header diff --git a/eclipse/checkstyle.xml b/eclipse/checkstyle.xml index 7237e079ff..c1f48bf557 100644 --- a/eclipse/checkstyle.xml +++ b/eclipse/checkstyle.xml @@ -15,6 +15,12 @@ + + + + + + diff --git a/eclipse/java.header b/eclipse/java.header new file mode 100644 index 0000000000..6ee33fc251 --- /dev/null +++ b/eclipse/java.header @@ -0,0 +1,15 @@ +^/\*+$ +^ \* Copyright \(c\) \d\d\d\d(-\d\d\d\d)? .+\.$ +^ \*$ +^ \* All rights reserved\. This program and the accompanying materials$ +^ \* are made available under the terms of the Eclipse Public License v2\.0$ +^ \* and Eclipse Distribution License v1\.0 which accompany this distribution\.$ +^ \*$ +^ \* The Eclipse Public License is available at$ +^ \* http://www\.eclipse\.org/legal/epl-v20\.html$ +^ \* and the Eclipse Distribution License is available at$ +^ \* http://www\.eclipse\.org/org/documents/edl-v10\.html\.$ +^ \*$ +^ \* Contributors:$ +^ \* .+$ +^ \*+/$ \ No newline at end of file diff --git a/leshan-core/pom.xml b/leshan-core/pom.xml index 2affbf86c3..75eeb77791 100644 --- a/leshan-core/pom.xml +++ b/leshan-core/pom.xml @@ -60,6 +60,12 @@ Contributors: + + maven-checkstyle-plugin + + org/eclipse/leshan/core/util/Base64.java,org/eclipse/leshan/core/util/BaseNCodec.java,org/eclipse/leshan/core/util/Hex.java,org/eclipse/leshan/core/util/RandomStringUtils.java,org/eclipse/leshan/core/util/StringUtils.java,org/eclipse/leshan/core/util/Validate.java,org/eclipse/leshan/core/util/datatype/ULong.java + + maven-jar-plugin