2011/8/5 Filip GruszczyĆski gruszczy@gmail.com:
Sounds reasonable to me, can you submit a patch (I think for editor.h and highlighting.c but do check if anything else is needed).
I have attached some patch, I hope it is enough.
I would have used ...WARNING = 9, see the comment 3 lines below.
Does it work with your pyflakey :-D plugin, I assumed that was what you wanted it for?
PS and if you want to add the ability for the standard system to have another regex for differentiating warnings from errors that would be even cooler, but a lot more work.
Do you have in mind building? From what I saw in code (mind I don't build anything usually, I am mostly Python programmer and if I build I just run make from the terminal), the red indicator is used to mark some errors in code. I understand that Geany parses output of the compiler and sets indicators in proper places? So I could also try to parse warnings in the compiler output and set those indicators there?
Thats a lot more work, ATM Geany only has one regex used to extract lines containing error messages and the related line numbers they occur in, so the error message can link to the source line. Those source lines get the wavey red underline indicator.
There needs to be some way of having the regex distinguish which messages are errors and which are warnings and then use different indicators.
Currently the line number and the filename are extracted as two matches in the regex, maybe the third match group could be for a warning line number if there was no error line number. Or preferably named matches error_line, warning_line and filename could be used if Geany's regex supports it.
Note that if the regex does not exist a fallback hack (which I described recently as a hairy hardcoded heuristic) is used. I don't suggest changing this.
Cheers Lex
-- Filip GruszczyĆski
Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany