You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Customizable xref:#reporter[reporter] (_SARIF_ or _Checkstyle_ XML).
39
39
40
40
* Allows multiple xref:#input-paths[input paths]. If you have a multi-module
41
41
project and only wish to check certain directories or modules, you can configure
@@ -61,7 +61,7 @@ jobs:
61
61
steps:
62
62
- uses: actions/checkout@v4
63
63
64
-
- uses: saveourtool/benedikt@v1
64
+
- uses: saveourtool/benedikt@v2
65
65
----
66
66
67
67
== Configuration
@@ -77,15 +77,15 @@ You can override the name or the path of your YAML configuration file using the
77
77
78
78
[source,yaml]
79
79
----
80
-
- uses: saveourtool/benedikt@v1
80
+
- uses: saveourtool/benedikt@v2
81
81
with:
82
82
config: path/to/diktat-analysis-custom.yml
83
83
----
84
84
85
85
[#reporter]
86
-
=== `reporter`: requesting a custom reporter
86
+
=== `reporter`: requesting a type of reporter
87
87
88
-
If you wish, you can report errors in a custom format.
88
+
If you wish, you can report errors in a different format.
89
89
90
90
* Default: `sarif`
91
91
* Required: **no**
@@ -114,35 +114,6 @@ reporter:
114
114
+
115
115
image::checkstyle-xml-reporting.png[Checkstyle-XML reporting assisted by reviewdog]
116
116
117
-
** `plain`: report errors in the plain-text format, e. g.:
118
-
+
119
-
[source]
120
-
----
121
-
C.kt:1:1: [MISSING_KDOC_TOP_LEVEL] all public and internal top-level classes and functions should have Kdoc: C (cannot be auto-corrected) (diktat-ruleset:kdoc-comments)
122
-
C.kt:1:1: [FILE_NAME_INCORRECT] file name is incorrect - it should end with .kt extension and be in PascalCase: C.kt (diktat-ruleset:file-naming)
123
-
C.kt:1:1: [PACKAGE_NAME_MISSING] no package name declared in a file: C.kt (diktat-ruleset:package-naming)
124
-
C.kt:1:7: [CLASS_NAME_INCORRECT] class/enum/interface name should be in PascalCase and should contain only latin (ASCII) letters or numbers: C (diktat-ruleset:identifier-naming)
125
-
C.kt:1:7: [IDENTIFIER_LENGTH] identifier's length is incorrect, it should be in range of [2, 64] symbols: C (cannot be auto-corrected) (diktat-ruleset:identifier-naming)
126
-
----
127
-
+
128
-
The errors, if any, are printed on the standard output.
129
-
130
-
** `plain?group_by_file`: same as above, but group errors by file, e. g.:
131
-
+
132
-
[source]
133
-
----
134
-
C.kt
135
-
1:1 [MISSING_KDOC_TOP_LEVEL] all public and internal top-level classes and functions should have Kdoc: C (cannot be auto-corrected)
136
-
1:1 [FILE_NAME_INCORRECT] file name is incorrect - it should end with .kt extension and be in PascalCase: C.kt
137
-
1:1 [PACKAGE_NAME_MISSING] no package name declared in a file: C.kt
138
-
1:7 [CLASS_NAME_INCORRECT] class/enum/interface name should be in PascalCase and should contain only latin (ASCII) letters or numbers: C
139
-
1:7 [IDENTIFIER_LENGTH] identifier's length is incorrect, it should be in range of [2, 64] symbols: C (cannot be auto-corrected)
140
-
----
141
-
142
-
** `json`: report errors in the JSON format to the file named `report.json`.
143
-
144
-
** `html`: report errors in the HTML format to the file named `report.html`.
145
-
146
117
[#input-paths]
147
118
=== `input-paths`: custom source sets
148
119
@@ -156,7 +127,7 @@ multiline string to specify multiple inputs.
156
127
+
157
128
[source,yaml]
158
129
----
159
-
- uses: saveourtool/benedikt@v1
130
+
- uses: saveourtool/benedikt@v2
160
131
with:
161
132
input-paths: |
162
133
path/to/file.kt
@@ -167,7 +138,7 @@ and all `\*.kt` and `*.kts` files are passed to _diKTat_.
167
138
+
168
139
[source,yaml]
169
140
----
170
-
- uses: saveourtool/benedikt@v1
141
+
- uses: saveourtool/benedikt@v2
171
142
with:
172
143
input-paths: |
173
144
src/main/kotlin
@@ -180,7 +151,7 @@ that match the path pattern. Path patterns may be negated, e. g.:
180
151
+
181
152
[source,yaml]
182
153
----
183
-
- uses: saveourtool/benedikt@v1
154
+
- uses: saveourtool/benedikt@v2
184
155
with:
185
156
input-paths: |
186
157
**/*.kt
@@ -220,7 +191,7 @@ JDK is not sufficient: you'll need to set **both** `java-distribution` **and**
220
191
221
192
[source,yaml]
222
193
----
223
-
- uses: saveourtool/benedikt@v1
194
+
- uses: saveourtool/benedikt@v2
224
195
with:
225
196
java-distribution: 'temurin'
226
197
java-version: 17
@@ -237,53 +208,17 @@ fatal (i.e. the current step terminates with a failure):
237
208
238
209
[source,yaml]
239
210
----
240
-
- uses: saveourtool/benedikt@v1
211
+
- uses: saveourtool/benedikt@v2
241
212
with:
242
213
fail-on-error: true
243
214
----
244
215
245
216
[NOTE]
246
217
247
218
This flag only affects the case when _diKTat_ exits with code **1**. Higher
0 commit comments