I dunno, its been like that since before my time (eg that line in 
[0.18](https://github.com/geany/geany/blob/a9aea5870de9a24f757ec080b567eb2618063f57/src/msgwindow.c#L902)
 is the same).

The purpose of the parsing is to identify lines in the compiler output 
containing filename and line number that the user might want to go to so they 
can investigate and fix the error.  That is used to make the message line 
clickable to go to that code line.  Its a user convenience.

Like I said above I believe the idea is to make as many lines as sensibly 
possible be clickable (ie file & line are detected no matter by which method) 
to allow the user to go to the any of those lines. Since many compilers spit 
out lots of lines for each error and the fix may be on any one of those lines.  
Lines that don't have file and line detected cannot be clickable because there 
is no indication of where to go, but all lines that have an identifiable 
filename and line number should be clickable even if they pertain to the same 
error.  And as the extra lines often have subtly varying formats the ability to 
simply add detection for those on top of the standard detection is useful.

I wouldn't like to see any lines that are currently clickable be made 
un-clickable, that would be a significant reduction in functionality, and all 
the other IDEs that I have recently used allow any line that has a recognised 
file and line in it to be clicked to go to that line, no matter what the 
message was.

Agreed in the current circumstances next/previous error action actually goes to 
next/previous line that is clickable, since in compilers for simple languages 
or older compilers thats usually the next error, but for the obnoxiously 
verbose modern C/C++ compilers its not the case.  But that would be harder to 
fix.

The only case I can see to not fallback if a regex fails is if the fallback is 
producing a lot of cases where it detects a filename and line number when its 
not one.  That would be better disabled with a checkbox per filetype (even 
better per regex) rather than blowing away the functionality for all filetypes 
hard coded.  Just because you don't want it shouldn't mean everyone loses it.

Or the other option is to totally remove the fallback code and provide an 
equivalent default regex in every filetype, PRs are welcome.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2817#issuecomment-850955065

Reply via email to