[英]How to ignore generated cpp files (from swig/python) in Coverity Scan?
I've got a C++ project with Python bindings generated by SWIG. 我有一个带有SWIG生成的Python绑定的C ++项目。 I get a generated file
python/libproj_wrap.cpp
from SWIG. 我从SWIG获得了一个生成的文件
python/libproj_wrap.cpp
。 This file is listed in .gitignore
. 该文件在
.gitignore
列出。
I'm running Coverity Scan through Travis. 我正在通过Travis运行Coverity Scan。 It seems like Coverity Scan tries to run
git blame
on this, which fails: 似乎Coverity Scan尝试对此执行
git blame
,但失败了:
fatal: no such path 'python/libproj_wrap.cpp' in HEAD
[WARNING] An error occurred while executing command at '/home/travis/build/unhammer/proj/python':
COMMAND: '/usr/bin/git blame -p proj_wrap.cpp' failed. Error code 128. Proceeding...
and I get no scan results. 我没有扫描结果。 Is there a way to tell Coverity Scan to ignore
.gitignore
'd stuff, or should I just run the scan on a build configured without SWIG bindings? 有没有办法告诉Coverity Scan忽略
.gitignore
的东西,还是应该只在没有SWIG绑定配置的构建上运行扫描?
That would happen if python/libproj_wrap.cpp
was tracked before being added to the .gitignore
. 如果在将
python/libproj_wrap.cpp
添加到.gitignore
之前对其进行了跟踪,则会发生这种情况。
Just to be sure, try and untrack it: 只是要确定,请尝试取消跟踪:
git rm --cached python/libproj_wrap.cpp
git commit -m "untrack python/libproj_wrap.cpp"
git push
And see if Travis is still trying a git blame
on that file. 并查看Travis是否仍在对该文件进行
git blame
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.