Can I parse the errorlist?
Submitted by Thursday, 21 August, 2008 - 10:59
on
I have an errorlist being generated from Lint, and so I can move to each warning and error within the code.
What I would like to do is write a macro that, for a given buffer and cursor position is first able to acquire the full path name and file line number (this bit I can do) and then parse the errorlist content looking for a match.
I would then like to insert the comment in the preceding line of the form '/*lint */' which would prevent such errors in future - again. the comment insertion I know how to do.
The question is this - is there a way to parse the errors in the errorlist, extracting file-name, line-number, and error-message for each item in the process?
What I would like to do is write a macro that, for a given buffer and cursor position is first able to acquire the full path name and file line number (this bit I can do) and then parse the errorlist content looking for a match.
I would then like to insert the comment in the preceding line of the form '/*lint */' which would prevent such errors in future - again. the comment insertion I know how to do.
The question is this - is there a way to parse the errors in the errorlist, extracting file-name, line-number, and error-message for each item in the process?