Skip to content

Commit

Permalink
Merge pull request #222 from mathieucarbou/enhancements/189
Browse files Browse the repository at this point in the history
Fix #189
  • Loading branch information
mathieucarbou authored Sep 11, 2021
2 parents 2296ec7 + 7d822ca commit 1b44280
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public enum DocumentType {
ACTIONSCRIPT("as", HeaderType.JAVADOC_STYLE),
ADA_BODY("adb", HeaderType.DOUBLEDASHES_STYLE),
ADA_SPEC("ads", HeaderType.DOUBLEDASHES_STYLE),
ASCII_DOC("adoc", HeaderType.ASCIIDOC_STYLE),
ASP("asp", HeaderType.ASP),
ASPECTJ("aj", HeaderType.JAVADOC_STYLE),
ASSEMBLER("asm", HeaderType.SEMICOLON_STYLE),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
public enum HeaderType {
////////// COMMENT TYPES //////////

// firstLine beforeEachLine endLine afterEachLine skipLinePattern firstLineDetectionPattern endLineDetectionPattern allowBlankLines isMultiline padLines
// firstLine beforeEachLine endLine afterEachLine skipLinePattern firstLineDetectionPattern lastLineDetectionPattern allowBlankLines isMultiline padLines
//generic
ASCIIDOC_STYLE("////", " // ", "////", "", null, "^////$", "^////$", false, true, false),
JAVADOC_STYLE("/**", " * ", " */", "", null, "(\\s|\\t)*/\\*.*$", ".*\\*/(\\s|\\t)*$", false, true, false),
SCALA_STYLE("/**", " * ", " */", "", null, "(\\s|\\t)*/\\*.*$", ".*\\*/(\\s|\\t)*$", false, true, false),
JAVAPKG_STYLE("EOL/*-", " * ", " */", "", "^package [a-z_]+(\\.[a-z_][a-z0-9_]*)*;$", "(EOL)*(\\s|\\t)*/\\*.*$", ".*\\*/(\\s|\\t)*$", false, true, false),
Expand Down Expand Up @@ -81,9 +82,9 @@ public enum HeaderType {

private HeaderType(String firstLine, String beforeEachLine,
String endLine, String afterEachLine,
String skipLinePattern, String firstLineDetectionPattern, String endLineDetectionPattern,
String skipLinePattern, String firstLineDetectionPattern, String lastLineDetectionPattern,
boolean allowBlankLines, boolean isMultiline, boolean padLines) {
definition = new HeaderDefinition(this.name().toLowerCase(), firstLine, beforeEachLine, endLine, afterEachLine, skipLinePattern, firstLineDetectionPattern, endLineDetectionPattern, allowBlankLines, isMultiline, padLines);
definition = new HeaderDefinition(this.name().toLowerCase(), firstLine, beforeEachLine, endLine, afterEachLine, skipLinePattern, firstLineDetectionPattern, lastLineDetectionPattern, allowBlankLines, isMultiline, padLines);
}

/**
Expand Down
15 changes: 15 additions & 0 deletions license-maven-plugin/src/test/resources/styles/asciidoc_style.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
////
// 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.
////

0 comments on commit 1b44280

Please sign in to comment.