Static Analysis using Jenkins job

Clang scan-build job

- job:
name: clang-scan
description: Run the clang scan-build on gluster code
project-type: freestyle
scm:
- git:
branches:
- $GERRIT_BRANCH
refspec: $GERRIT_REFSPEC
choosing-strategy: gerrit
url: https://github.com/gluster/glusterfs
properties:
- build-discarder:
days-to-keep: 1
num-to-keep: 1
artifact-days-to-keep: 2
artifact-num-to-keep: 2
triggers:
- timed: “H 0 * * *”
builders:
- shell: !include-raw: ../scripts/clang.sh
publishers:
- scan-build:
mark-unstable: true
threshold: 899
./autogen.sh
./configure CC=clang
scan-build -o ${WORKSPACE}/clangScanBuildReports -v -v — use-cc clang — use-analyzer=/usr/bin/clang make
HTML reports generated after successful build

Deepshikha Khandelwal

Written by

Software Engineering Intern at Red Hat

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade