warmcat/libwebsockets — pull request #203 by JoakimSoderberg (2014-11-27 23:07:45+00:00)
Title: Add support for coverity static analysis scan.

http://www.coverity.com/ is a great static analysis tool that is free for open source projects.

With travis-ci it is possible to make it upload builds to this service automatically. However, there is a limit on 7 scans per week, so it is not recommended to do it on each commit, but rather have a separate branch that you can push to every now and then to see if there are any new defects.

This pull request contains most of what is needed in the travis file. To complete the process you however need to add an encrypted version of your `COVERITY_SCAN_TOKEN` to the `.travis.yml` file where I have indicated.

What you need to do:

1. Go to https://scan.coverity.com/
2. Sign Up -> **Sign in with Github**
3. Click **"Add Project"** -> **"Register my Github project"** -> Find **libwebsockets** and add it.
4. On the project page click **"Submit Build"**
5. At the top of the page click **"Configure Travis CI"**
6. Copy the secure string from the example and put it in the **libwebsockets** `.travis.yml` file where indicated.

After doing this you should be able to push to the `coverity_scan` branch and soon get a report from coverity, and use their tool to classify the different defects as false positive and so on. This is a great tool for finding complicated bugs.

If you get stuck Here is the official Travis-CI guide for further details:
https://scan.coverity.com/travis_ci