Sublime Forum

lineNumberRegex can't match multiline error messages?

#1

I have the following build setup for Powershell:

build powershell.exe -noprofile -noninteractive -executionpolicy remotesigned -file "$File" lineNumberRegex ^At ]([A-Za-z]:.*?):([0-9]*) showWhenFinished true

The problem is that if the line reporting the error location exceeds the console’s buffer width, PS will spit back the data with newline chars and Sublime won’t be able to find the captures. Is it possible to make the dot operator consume the newline too or tell the build system to perform a multiline search?

Also, I’ve noticed that showFinishedTrue doesn’t report the time on success after running a PowerShell script file.

Example:

[code]hello
world
next line throws an error
Attempted to divide by zero.
At C:\Users\guillermooo\AppData\Roaming\Sublime Text\Packages\User\psbuffistoos
hortletsusesomethinglonger.ps1:4 char:3

  • 0/ <<<< $null
    • CategoryInfo : NotSpecified: (:slight_smile: ], RuntimeException
    • FullyQualifiedErrorId : RuntimeException[/code]
0 Likes

#2

Unfortunately, no, it’s not possible atm to write a multiline regex. I’ve added it to the todo list.

0 Likes