You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Sep 25 2024 10:13:04)
Included patches: 1-16, 647, 678, 697
Operating System:
Xubuntu 22.04
What went wrong
When I add a compile_commands.json file to the project, ALE correctly detects this and uses cppcheck's ability to read this file by passing it to its --project option.
--project can also no longer be used in conjunction with additional source files.
Unfortunately, this is, what ALE does. This is the resulting :AleInfo:
(finished - exit code 1) ['/bin/bash', '-c', 'cd ''/home/matthias/dev/c-lsp-test'' && ''cppcheck'' -q --language=c --template=''{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}'' --project=''build/compile_commands.json'' --file-filter=''test/test.c'' --enable=style ''/tmp/vaX
Frmt/2/test.c''']
<<<OUTPUT STARTS>>>
cppcheck: error: --project cannot be used in conjunction with source files.
<<<OUTPUT ENDS>>>
Reproducing the bug
Have a cppcheck version >2.13
Have a compile_commands.json file in your project
Workaround
Removing line 19 in ale_linters/c/cppcheck.vim (the %t in the command) seems to fix this issue. But I guess it would break it for projects that do not have a compile_commands.json file.
The text was updated successfully, but these errors were encountered:
Information
VIM version
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Sep 25 2024 10:13:04)
Included patches: 1-16, 647, 678, 697
Operating System:
Xubuntu 22.04
What went wrong
When I add a
compile_commands.json
file to the project, ALE correctly detects this and uses cppcheck's ability to read this file by passing it to its--project
option.The release notes of version 2.13 (https://github.com/danmar/cppcheck/releases/tag/2.13.0) of cppcheck include the following entry:
Unfortunately, this is, what ALE does. This is the resulting
:AleInfo
:Reproducing the bug
compile_commands.json
file in your projectWorkaround
Removing line 19 in
ale_linters/c/cppcheck.vim
(the%t
in the command) seems to fix this issue. But I guess it would break it for projects that do not have acompile_commands.json
file.The text was updated successfully, but these errors were encountered: