Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Point linter-clang to compile_commands.json #208

Open
samuela opened this issue May 23, 2017 · 4 comments
Open

Point linter-clang to compile_commands.json #208

samuela opened this issue May 23, 2017 · 4 comments

Comments

@samuela
Copy link

samuela commented May 23, 2017

AFAICT, there's no way to point linter-clang to a compile_commands.json file. How exactly is this supposed to work?

@keplersj
Copy link
Contributor

@ValentinVERGEZ
Copy link

ValentinVERGEZ commented May 26, 2018

So, the README and the Changelog talk about compile_commands.json support. Is it true or is it missing ?

I don't know why, but linter-clang seems to ignore my compile_commands.json. It reports missing header errors but when I test my file with clang-check -analyze <file> it reports no error.

@ValentinVERGEZ
Copy link

It was a problem on my side. I use a symlink from my sources to my build workspace, so the sources seen by CMake were on a different location than the ones seen by linter-clang.

The compile_commands.json works fine. Mybe this issue should be closed ?

@alehaa
Copy link

alehaa commented Nov 21, 2018

If I understand @samuela right, a config option is requested to set a path, where to search for compile_commands.json.

For myself I use a subdirectory for CMake build files and the compile_commands.json is also written into this directory. However, telling the linter to search in $PROJECT_ROOT/build/ for this file would make a symlink for this file in each project's root superfluous.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants