I am trying to add GNU Fortran compiler to compiler plugin. I have two problems:
1) Most errors/warnings the Fortran compiler writes on 4 lines, like in example:
test.f90:69.21:
integer :: i
1
Warning: Unused variable 'i' declared at (1)
What is the best way to catch such messages?
My solution (may be not the best): I catch 1st line and mark it as 'cltInfo', and then I catch 4th line and mark it as 'cltWarning'(cltError if error). The drawback is that user get two messages on 'Build messages' window for each error/warning: one just with line number (and with possibility to jump to code line by clicking on it) and second message just with error/warning message (but without possibility to jump to code line). Example:
test.f90 69 test.f90
Warning: Unused variable 'i' declared
2) The second problem: when Fortran modules are used in user code, the compiler generate not only *.o file, but *.mod files too. When user hit Build->Clean, then *.o files are deleted but *.mod files are not.
How to delete *.mod files?
I haven't found solution for it, but may be, it is not so important because all project files are forced to be recompiled anyway.