-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### What's done: * HEADER_MISSING_OR_WRONG_COPYRIGHT - if pattern have obsolete year, also update it like in WRONG_COPYRIGHT_YEAR * If copyright have old first year, but actual last year - allow such cases * Add more tests * Enable multi release for log4j2
- Loading branch information
1 parent
e8007b5
commit 710ef1a
Showing
13 changed files
with
244 additions
and
10 deletions.
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
2 changes: 1 addition & 1 deletion
2
diktat-rules/src/test/resources/test/paragraph2/header/AutoCopyrightApplyPatternTest.kt
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package test.paragraph2.header | ||
|
||
class Example | ||
class Example |
19 changes: 19 additions & 0 deletions
19
...-rules/src/test/resources/test/paragraph2/header/CopyrightAbsentInvalidPatternExpected.kt
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,19 @@ | ||
/* | ||
Copyright (c) My Company., Ltd. 2012-2021. All rights reserved. | ||
*/ | ||
/** | ||
* Lorem ipsum | ||
* dolor sit amet | ||
*/ | ||
|
||
package test.paragraph2.header | ||
|
||
import org.cqfn.diktat.example.A | ||
import org.cqfn.diktat.example.B | ||
|
||
/** | ||
* Example class | ||
*/ | ||
class Example { | ||
lateinit var map: Map<A, B> | ||
} |
16 changes: 16 additions & 0 deletions
16
diktat-rules/src/test/resources/test/paragraph2/header/CopyrightAbsentInvalidPatternTest.kt
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,16 @@ | ||
/** | ||
* Lorem ipsum | ||
* dolor sit amet | ||
*/ | ||
|
||
package test.paragraph2.header | ||
|
||
import org.cqfn.diktat.example.A | ||
import org.cqfn.diktat.example.B | ||
|
||
/** | ||
* Example class | ||
*/ | ||
class Example { | ||
lateinit var map: Map<A, B> | ||
} |
19 changes: 19 additions & 0 deletions
19
diktat-rules/src/test/resources/test/paragraph2/header/CopyrightDifferentYearExpected2.kt
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,19 @@ | ||
/* | ||
Copyright (c) My Company., Ltd. 2021. All rights reserved. | ||
*/ | ||
/** | ||
* Lorem ipsum | ||
* dolor sit amet | ||
*/ | ||
|
||
package test.paragraph2.header | ||
|
||
import org.cqfn.diktat.example.A | ||
import org.cqfn.diktat.example.B | ||
|
||
/** | ||
* Example class | ||
*/ | ||
class Example { | ||
lateinit var map: Map<A, B> | ||
} |
19 changes: 19 additions & 0 deletions
19
diktat-rules/src/test/resources/test/paragraph2/header/CopyrightDifferentYearTest2.kt
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,19 @@ | ||
/* | ||
Copyright (c) My Company., Ltd. 2003. All rights reserved. | ||
*/ | ||
/** | ||
* Lorem ipsum | ||
* dolor sit amet | ||
*/ | ||
|
||
package test.paragraph2.header | ||
|
||
import org.cqfn.diktat.example.A | ||
import org.cqfn.diktat.example.B | ||
|
||
/** | ||
* Example class | ||
*/ | ||
class Example { | ||
lateinit var map: Map<A, B> | ||
} |
19 changes: 19 additions & 0 deletions
19
...les/src/test/resources/test/paragraph2/header/CopyrightInvalidPatternValidCodeExpected.kt
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,19 @@ | ||
/* | ||
Copyright (c) My Company., Ltd. 2021-2021. All rights reserved. | ||
*/ | ||
/** | ||
* Lorem ipsum | ||
* dolor sit amet | ||
*/ | ||
|
||
package test.paragraph2.header | ||
|
||
import org.cqfn.diktat.example.A | ||
import org.cqfn.diktat.example.B | ||
|
||
/** | ||
* Example class | ||
*/ | ||
class Example { | ||
lateinit var map: Map<A, B> | ||
} |
19 changes: 19 additions & 0 deletions
19
...t-rules/src/test/resources/test/paragraph2/header/CopyrightInvalidPatternValidCodeTest.kt
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,19 @@ | ||
/* | ||
Copyright (c) My Company., Ltd. 2021-2021. All rights reserved. | ||
*/ | ||
/** | ||
* Lorem ipsum | ||
* dolor sit amet | ||
*/ | ||
|
||
package test.paragraph2.header | ||
|
||
import org.cqfn.diktat.example.A | ||
import org.cqfn.diktat.example.B | ||
|
||
/** | ||
* Example class | ||
*/ | ||
class Example { | ||
lateinit var map: Map<A, B> | ||
} |
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