Skip to content

Commit

Permalink
Tested maven plugin (#1823)
Browse files Browse the repository at this point in the history
### What's done:
- updated `diktat-analysis.yml` files for all examples.
- added multi-module maven example.
- tested single-module and multi-module maven examples.
- tested githubActions via `-Ddiktat.githubActions=true`.
- tested reporters.

Closes #1792
  • Loading branch information
DrAlexD authored Nov 27, 2023
1 parent 3c572f1 commit fca7f53
Show file tree
Hide file tree
Showing 9 changed files with 648 additions and 1 deletion.
6 changes: 6 additions & 0 deletions examples/gradle-groovy-dsl/diktat-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@
# Checks that annotation is on a single line
- name: ANNOTATION_NEW_LINE
enabled: true
# Checks that method annotated with `Preview` annotation is private and has Preview suffix
- name: PREVIEW_ANNOTATION
enabled: true
# Checks that enum structure is correct: enum entries should be separated by comma and line break and last entry should have semicolon in the end.
- name: ENUMS_SEPARATED
enabled: true
Expand Down Expand Up @@ -433,6 +436,9 @@
# Checks that property in constructor doesn't contain comment
- name: KDOC_NO_CONSTRUCTOR_PROPERTY
enabled: true
configuration:
isParamTagsForParameters: true # create param tags for parameters without val or var
isParamTagsForPrivateProperties: true # create param tags for private properties
# Checks that the long lambda has parameters
- name: TOO_MANY_LINES_IN_LAMBDA
enabled: true
Expand Down
6 changes: 6 additions & 0 deletions examples/gradle-kotlin-dsl-multiproject/diktat-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@
# Checks that annotation is on a single line
- name: ANNOTATION_NEW_LINE
enabled: true
# Checks that method annotated with `Preview` annotation is private and has Preview suffix
- name: PREVIEW_ANNOTATION
enabled: true
# Checks that enum structure is correct: enum entries should be separated by comma and line break and last entry should have semicolon in the end.
- name: ENUMS_SEPARATED
enabled: true
Expand Down Expand Up @@ -433,6 +436,9 @@
# Checks that property in constructor doesn't contain comment
- name: KDOC_NO_CONSTRUCTOR_PROPERTY
enabled: true
configuration:
isParamTagsForParameters: true # create param tags for parameters without val or var
isParamTagsForPrivateProperties: true # create param tags for private properties
# Checks that the long lambda has parameters
- name: TOO_MANY_LINES_IN_LAMBDA
enabled: true
Expand Down
6 changes: 6 additions & 0 deletions examples/gradle-kotlin-dsl/diktat-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@
# Checks that annotation is on a single line
- name: ANNOTATION_NEW_LINE
enabled: true
# Checks that method annotated with `Preview` annotation is private and has Preview suffix
- name: PREVIEW_ANNOTATION
enabled: true
# Checks that enum structure is correct: enum entries should be separated by comma and line break and last entry should have semicolon in the end.
- name: ENUMS_SEPARATED
enabled: true
Expand Down Expand Up @@ -433,6 +436,9 @@
# Checks that property in constructor doesn't contain comment
- name: KDOC_NO_CONSTRUCTOR_PROPERTY
enabled: true
configuration:
isParamTagsForParameters: true # create param tags for parameters without val or var
isParamTagsForPrivateProperties: true # create param tags for private properties
# Checks that the long lambda has parameters
- name: TOO_MANY_LINES_IN_LAMBDA
enabled: true
Expand Down
13 changes: 13 additions & 0 deletions examples/maven-multiproject/backend/src/main/kotlin/Main.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package incorrect

class incorrectname: Exception() {
fun INCORRECT_FUNCTION() {
throw Exception()
}

// fun myCommentedFunction() {
// }

val Incorrect_Val = 5

}
Loading

0 comments on commit fca7f53

Please sign in to comment.