From ee4548bf5312d01be0cd5b5d5da282166c5fa7d9 Mon Sep 17 00:00:00 2001 From: Mathieu Carbou Date: Tue, 5 Feb 2019 22:25:09 -0500 Subject: [PATCH] Close #77: Added new style: SINGLE_LINE_DOUBLESLASH_STYLE --- .../maven/plugin/license/header/HeaderType.java | 1 + .../styles/single_line_doubleslash_style.txt | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 license-maven-plugin/src/test/resources/styles/single_line_doubleslash_style.txt diff --git a/license-maven-plugin/src/main/java/com/mycila/maven/plugin/license/header/HeaderType.java b/license-maven-plugin/src/main/java/com/mycila/maven/plugin/license/header/HeaderType.java index baa60242d..d5695ec23 100755 --- a/license-maven-plugin/src/main/java/com/mycila/maven/plugin/license/header/HeaderType.java +++ b/license-maven-plugin/src/main/java/com/mycila/maven/plugin/license/header/HeaderType.java @@ -52,6 +52,7 @@ public enum HeaderType { EXCLAMATION3_STYLE("!!!", "!!! ", "!!!EOL", "", null, "!!!.*$", "!!!.*$", false, false, false), DOUBLESLASH_STYLE("//", "// ", "//EOL", "", null, "//.*$", "//.*$", false, false, false), + SINGLE_LINE_DOUBLESLASH_STYLE("", "// ", "", "", null, "//.*$", "//.*$", false, false, false), TRIPLESLASH_STYLE("///", "/// ", "///EOL", "", null, "///.*$", "///.*$", false, false, false), // non generic PHP("/*", " * ", " */", "", "^<\\?php.*$", "(\\s|\\t)*/\\*.*$", ".*\\*/(\\s|\\t)*$", false, true, false), diff --git a/license-maven-plugin/src/test/resources/styles/single_line_doubleslash_style.txt b/license-maven-plugin/src/test/resources/styles/single_line_doubleslash_style.txt new file mode 100644 index 000000000..9cae76af5 --- /dev/null +++ b/license-maven-plugin/src/test/resources/styles/single_line_doubleslash_style.txt @@ -0,0 +1,13 @@ +// Copyright (C) ${year} http://code.google.com/p/maven-license-plugin/ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License.