File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
modules/nextflow/src/main/groovy/nextflow/cli Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,8 @@ class CmdLint extends CmdBase {
201
201
private void printErrors (SourceUnit source ) {
202
202
errorListener. beforeErrors()
203
203
204
- source. getErrorCollector(). getErrors(). stream()
204
+ final errors = source. getErrorCollector(). getErrors() ?: []
205
+ errors. stream()
205
206
.filter(message -> message instanceof SyntaxErrorMessage )
206
207
.map(message -> ((SyntaxErrorMessage ) message). getCause())
207
208
.sorted(ERROR_COMPARATOR )
@@ -210,7 +211,8 @@ class CmdLint extends CmdBase {
210
211
summary. errors + = 1
211
212
})
212
213
213
- source. getErrorCollector(). getWarnings(). stream()
214
+ final warnings = source. getErrorCollector(). getWarnings() ?: []
215
+ warnings. stream()
214
216
.filter(warning -> warning ! instanceof ParanoidWarning )
215
217
.sorted(WARNING_COMPARATOR )
216
218
.forEach((warning) -> {
You can’t perform that action at this time.
0 commit comments