Error File plug-in
-
Has anyone developed a plug in to handle an error file that contains a list of errors (eg filename, line position) such that double clicking on an entry goes to the specified file, line and position?
-
Specifically for that? Not that I’m aware of. But…
The NppExec plugin has Console Output Filters, which will color error messages (and similar) for things that are printed into the NppExec Console – and double-clicking on those lines in the NppExec Console will take you to the right file and line number (and even character position in the line, if your error log is that specific). So if you set up an NppExec script that ran
cmd /c type "$(FULL_CURRENT_PATH)"
, it would take the contents of the current file and print them in the NppExec console.So if you use Plugins > NppExec > Console Output Filters to define a pattern that matches the errors in your specific format. The NppExec_Guide.txt help-file that comes with the plugin shows examples for gcc warnings and errors:
Example 1:
%ABSFILE%:%LINE%: warning:*
=> detects the warning lines from gcc
Example 2:%ABSFILE%:%LINE%: error:*
=> detects the error lines from gcc(The
%CHAR%
sequence will match the character-position number)Further, you can use NppExec to actually run your compiler or build process, so if you wanted to skip the temporary error-output file, you could run the build inside NppExec (from a script or manually typed in the Console) and just allow the build to output to STDERR as per normal inside the Console, and NppExec would still be able to see the errors.