clion-cppcheck icon indicating copy to clipboard operation
clion-cppcheck copied to clipboard

Implement using ExternalAnnotator

Open firewave opened this issue 3 years ago • 1 comments

From https://youtrack.jetbrains.com/issue/CPP-22882#focus=Comments-27-5675064.0-0

LocalInspectionTool is not designed for running external executables, like cppcheck. For such task, ExternalAnnotator should be used. The flow is similar: inherit this class, override collectInformation to get all required data (like, virtual files, include dir, etc.), doAnnotate to actually execute cppcheck and finally apply to apply diagnostics to editor.

firewave avatar Dec 24 '21 20:12 firewave

More pointers on how to properly implement the plugin: https://youtrack.jetbrains.com/issue/CPP-23527#focus=Comments-27-5707401.0-0

firewave avatar Jan 28 '22 19:01 firewave