git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [GSoC] [PATCH] travis-ci: added clang static analysis
@ 2018-03-05 20:04 SiddharthaMishra
  2018-03-06  1:27 ` Junio C Hamano
  2018-03-12 10:19 ` Lars Schneider
  0 siblings, 2 replies; 9+ messages in thread
From: SiddharthaMishra @ 2018-03-05 20:04 UTC (permalink / raw)
  To: git; +Cc: SiddharthaMishra

Added a job to run clang static code analysis on the master and maint branch

Signed-off-by: SiddharthaMishra <sidm1999@gmail.com>
---
 .travis.yml               | 17 ++++++++++++++++-
 ci/run-static-analysis.sh |  9 ++++++++-
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 4684b3f4f..9b891d182 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -48,7 +48,7 @@ matrix:
       before_install:
       before_script:
       script: ci/run-linux32-docker.sh
-    - env: jobname=StaticAnalysis
+    - env: jobname=CocciStaticAnalysis
       os: linux
       compiler:
       addons:
@@ -59,6 +59,21 @@ matrix:
       before_script:
       script: ci/run-static-analysis.sh
       after_failure:
+    - if: branch IN (master, maint)
+      env: jobname=ClangStaticAnalysis
+      os: linux
+      compiler:
+      add_ons:
+        apt:
+          sources:
+          - ubuntu-toolchain-r-test
+          - llvm-toolchain-trusty
+          packages:
+          - clang
+      before_install:
+      before_script:
+      script: ci/run-static-analysis.sh
+      after_failure:
     - env: jobname=Documentation
       os: linux
       compiler:
diff --git a/ci/run-static-analysis.sh b/ci/run-static-analysis.sh
index fe4ee4e06..6ae032f54 100755
--- a/ci/run-static-analysis.sh
+++ b/ci/run-static-analysis.sh
@@ -5,6 +5,13 @@
 
 . ${0%/*}/lib-travisci.sh
 
-make coccicheck
+case "$jobname" in
+ClangStaticAnalysis)
+	scan-build -analyze-headers --status-bugs make
+	;;
+CocciStaticAnalysis)
+	make coccicheck
+	;;
+esac
 
 save_good_tree
-- 
2.16.2.248.ge2408a6f7.dirty


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-04-02 20:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-05 20:04 [GSoC] [PATCH] travis-ci: added clang static analysis SiddharthaMishra
2018-03-06  1:27 ` Junio C Hamano
2018-03-06  8:34   ` Siddhartha Mishra
2018-03-07 13:16     ` Johannes Schindelin
2018-03-12 10:19 ` Lars Schneider
2018-03-13 17:45   ` Siddhartha Mishra
2018-03-13 17:52     ` Siddhartha Mishra
2018-04-01 14:39     ` Lars Schneider
2018-04-02 20:08       ` Siddhartha Mishra

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).