Re: [GSoC] [PATCH] travis-ci: added clang static analysis

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

That looks interesting but I agree with Dscho that we should not limit
this to master/maint.

I assume you did run this on TravisCI already? Can you share a link?
I assume you did find errors? Can we fix them or are there too many?
If there are existing errors, how do we define a "successful" build?

Thanks for working on this,
Lars

> On 05 Mar 2018, at 21:04, SiddharthaMishra <sidm1999@xxxxxxxxx> wrote:
> 
> Added a job to run clang static code analysis on the master and maint branch
> 
> Signed-off-by: SiddharthaMishra <sidm1999@xxxxxxxxx>
> ---
> .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
> 





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux