Closed tsjordan-eng closed 4 years ago
Based on your analysis, I made the following changes in ale/ale_linters/cpp/cppcheck.vim to solve this problem:
\ 'callback': 'ale#handlers#cppcheck#HandleCppCheckFormat',
instead of
\ 'callback': 'ale#handlers#gcc#HandleGCCFormatWithIncludes',
Clever! Now is there a way for ALE to conditionally set the later based on the cppcheck version?
I've merged the pull request now which fixes the formatting of the messages output by cppcheck, and how we parse them.
Cppcheck 1.89 changes the warning output to match gcc better, but this breaks ALE's linter parser.
Information
VIM version
NVIM v0.4.3 Build type: RelWithDebInfo
RHEL7
What went wrong
Warnings and Errors wouldn't show up in the gutter.
Reproducing the bug
Use cppcheck linter with Cppcheck v1.89+
:ALEInfo
Proposed Fix
I'm not sure where to fix this. I have changed my:
according to https://github.com/danmar/cppcheck/releases/tag/1.89 In my configuration, but I think it should be fixed in either:
autoload/ale/handlers/cppcheck.vim
:ale#handlers#cppcheck#HandleCppCheckFormat
in the pattern matcherale_linters/cpp/cppcheck.vim
:call ale#Set('cpp_cppcheck_options', '--enable=style --template=cppcheck1')
README
to tell people what's up