[Github-comments] [geany/geany] warning support (#1649)

Yan Pashkovsky notifications at xxxxx
Mon Oct 16 10:43:09 UTC 2017


> Not sure what you mean, can you expand?

While I was implementing this issue I haven't traced any usage of regexp (I've inserted printf's). It seems they are defined in filetype config files. Also I didn't find convetions for regexp. For example mapping of group number, type and meaning (e.g groupn:2; meaning:line number; type:integer). I don't think it's a good idea to hardcode such mapping.

----

Compiler generated line type I think should be defined by translation. Here are the examples:
```
main.c:19:2: error: use of undeclared identifier 'b'
main.c:13:6: warning: unused variable ‘a’ [-Wunused-variable]
main.c:19:2: ошибка: использование необъявленного идентификатора 'b'
main.c:13:6: предупреждение: неиспользуемая переменная ‘a’ [-Wunused-variable]
```
Algorithm suggesion pseudocode:
```
linetypestring = splittedline[typeindex];
linetypestring.tolower();
if(linetypestring.find("err") OR linetypestring.find(translate(current_locale, "error")))
  linetype = ERROR;
else if(linetypestring.find("warn") OR linetypestring.find(translate(current_locale, "warning")))
  linetype = WARNING;
... and so on
```
I don't know how do regexps can solve this problem

-- 
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/pull/1649#issuecomment-336849431
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20171016/39f03037/attachment.html>


More information about the Github-comments mailing list