且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

运行每个Travis拉取请求构建的Coverity扫描

更新时间:2023-11-22 22:45:22

I asked Coverity support and they replied

The trigger for Coverity Scan happens for the specific branch and not for the pull request, and specially the branch that is mentioned in .travis.yml

UPDATE

With user @Admaster's help I started playing with Jenkins and cppcheck plugin. Jenkins is scanning pull requests successfully without setting build status to Github commits(Travis does set).

Example

So I continued experimenting with Travis and came over this repo. I changed my .travis.yml file that looks like this

language: c
compiler: gcc

before_install:
  - sudo apt-get install -qq cppcheck

script:
  - cppcheck --error-exitcode=1 --quiet .
  - make

cppcheck may be less effective then Coverity, but it's sufficient for students' assignments.