mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-06-07 16:17:23 +02:00
Add clang analyzer check using scan-build
This commit is contained in:
parent
16e7d06083
commit
23dd471f6b
@ -2,15 +2,18 @@ dist: xenial
|
|||||||
language: c
|
language: c
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
|
- clang
|
||||||
- clang-format
|
- clang-format
|
||||||
- python3-pip
|
- python3-pip
|
||||||
- python3-setuptools
|
- python3-setuptools
|
||||||
- libsystemd-dev
|
- libsystemd-dev
|
||||||
- ninja-build
|
- ninja-build
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- $(git ls-files -o | tr "\n" ":")
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- pip3 install wheel
|
- pip3 install wheel
|
||||||
@ -21,3 +24,4 @@ script:
|
|||||||
- ./scripts/format-check.sh
|
- ./scripts/format-check.sh
|
||||||
- ./bootstrap.sh -Dwith-examples=true
|
- ./bootstrap.sh -Dwith-examples=true
|
||||||
- gamemoded -v
|
- gamemoded -v
|
||||||
|
- ./scripts/static-analyser-check.sh
|
14
scripts/static-analyser-check.sh
Executable file
14
scripts/static-analyser-check.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Exit on failure
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Build directly
|
||||||
|
cd build/
|
||||||
|
|
||||||
|
# Collect scan-build output
|
||||||
|
ninja scan-build | tee /tmp/scan-build-results.txt
|
||||||
|
|
||||||
|
# Invert the output - if this string exists it's a fail
|
||||||
|
! grep -E '[0-9]+ bugs? found.' /tmp/scan-build-results.txt
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user