-
Notifications
You must be signed in to change notification settings - Fork 460
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a $YEAR as a supported variable in license
This token is replaced by the current year in the following cases: * the license is missing * the license in not formatted * the $YEAR is not like 1990 or 1990-2005
- Loading branch information
1 parent
7401807
commit e80f34d
Showing
6 changed files
with
163 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright (C) __YEAR_to_replace_in_tests__. ACME corp. | ||
* This library is free software; you can redistribute it and/or modify it under the terms | ||
* of the GNU Lesser General Public License as published by the Free Software Foundation | ||
* version 2.1 of the License. | ||
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; | ||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU Lesser General Public License for more details. | ||
* You should have received a copy of the GNU Lesser General Public License along with this | ||
* program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth | ||
* Floor, Boston, MA 02110-1301, USA. | ||
**/ | ||
package com.acme; | ||
|
||
import java.util.function.Function; | ||
|
||
|
||
public class Java8Test { | ||
public void doStuff() throws Exception { | ||
Function<String, Integer> example = Integer::parseInt; | ||
example.andThen(val -> { | ||
return val + 2; | ||
} ); | ||
SimpleEnum val = SimpleEnum.A; | ||
switch (val) { | ||
case A: | ||
break; | ||
case B: | ||
break; | ||
case C: | ||
break; | ||
default: | ||
throw new Exception(); | ||
} | ||
} | ||
|
||
public enum SimpleEnum { | ||
A, B, C; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
testlib/src/test/resources/license/MissLicenseWithYear.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.acme; | ||
|
||
import java.util.function.Function; | ||
|
||
|
||
public class Java8Test { | ||
public void doStuff() throws Exception { | ||
Function<String, Integer> example = Integer::parseInt; | ||
example.andThen(val -> { | ||
return val + 2; | ||
} ); | ||
SimpleEnum val = SimpleEnum.A; | ||
switch (val) { | ||
case A: | ||
break; | ||
case B: | ||
break; | ||
case C: | ||
break; | ||
default: | ||
throw new Exception(); | ||
} | ||
} | ||
|
||
public enum SimpleEnum { | ||
A, B, C; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* Copyright (C) $YEAR. ACME corp. | ||
* This library is free software; you can redistribute it and/or modify it under the terms | ||
* of the GNU Lesser General Public License as published by the Free Software Foundation | ||
* version 2.1 of the License. | ||
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; | ||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU Lesser General Public License for more details. | ||
* You should have received a copy of the GNU Lesser General Public License along with this | ||
* program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth | ||
* Floor, Boston, MA 02110-1301, USA. | ||
**/ |