[英]using flycheck with compile_commands.json
I've looked around at some open question, but I cannot figure out how to use flycheck-clangcheck
mode to read the include dirs from the compile_commands.json
db.我查看了一些悬而未决的问题,但我无法弄清楚如何使用
flycheck-clangcheck
模式从compile_commands.json
数据库中读取包含目录。
I currently have a largish c++ project.我目前有一个较大的 C++ 项目。 Almost every file would choke on the first
#include <some_package>
line, and flycheck would not reveal any other errors.几乎每个文件都会在第一个
#include <some_package>
行阻塞,而 flycheck 不会显示任何其他错误。
I ended up finding flycheck-clangcheck
, and I setup the package per the README, but I cannot get the program to work.我最终找到了
flycheck-clangcheck
,并根据自述文件设置了程序包,但我无法让程序运行。
Now, when I open the project, I do not see the flycheck red underline error, but I do see the following error message:现在,当我打开项目时,我没有看到 flycheck 红色下划线错误,但我确实看到了以下错误消息:
Error while checking syntax automatically: (file-missing "Opening input file" "No such file or directory" "/compile_commands.json")
I have tried modifying: - flycheck-clangcheck-build-path
in dir-locals.el as well as in my global emacs config - flycheck-clangcheck-dbname
to point directly to the db path.我尝试修改: - dir-locals.el 中
flycheck-clangcheck-build-path
以及我的全局 emacs 配置 - flycheck-clangcheck-dbname
直接指向数据库路径。
Does anyone know how I can easily integrate flycheck with the compile_commands.json
db?有谁知道我如何轻松地将 flycheck 与
compile_commands.json
数据库集成?
flycheck-clangcheck-build-path
must be set as a string with double ticks eg "/home/user/project/"
. flycheck-clangcheck-build-path
必须设置为带有双勾号的字符串,例如"/home/user/project/"
。 flycheck-clangcheck is not controling variable type. flycheck-clangcheck 不控制变量类型。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.