-
Notifications
You must be signed in to change notification settings - Fork 759
Open
Labels
Description
Bug report
From this Slack thread: https://nextflow.slack.com/archives/C02TPSL19UJ/p1765881373697229
The following test cases have syntax errors:
// nextflow.config
process {
withLabel:
'bambino' {
container = "..."
}
}process SEQTK_SAMPLE {
script:
"""
${
params.is_paired_end
? "..."
: "..."
}
"""
}Expected behavior and actual behavior
The linter should report syntax errors for both snippets (the language sever reports them correctly).
Instead it fails with an error like this:
java.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
at ...
at java.base/java.lang.String.substring(String.java:2834)
at nextflow.script.parser.v2.StandardErrorListener.printCodeBlock(ErrorListener.groovy:187)
at nextflow.script.parser.v2.StandardErrorListener.onError(ErrorListener.groovy:99)
at nextflow.cli.CmdLint$_printErrors_lambda7.doCall(CmdLint.groovy:210)
at nextflow.cli.CmdLint.printErrors(CmdLint.groovy:205)
at nextflow.cli.CmdLint.access$0(CmdLint.groovy)
at nextflow.cli.CmdLint$_checkErrors_lambda4.doCall(CmdLint.groovy:193)
at nextflow.cli.CmdLint.checkErrors(CmdLint.groovy:189)
at nextflow.cli.CmdLint.run(CmdLint.groovy:149)
at nextflow.cli.Launcher.run(Launcher.groovy:515)
at nextflow.cli.Launcher.main(Launcher.groovy:675)
Steps to reproduce the problem
Run nextflow lint with the given code snippets.