-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapcraft.yaml
57 lines (54 loc) · 1.74 KB
/
snapcraft.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: cppcheck
adopt-info: cppcheck
version: 2.13.99
base: core22
grade: stable
confinement: strict
architectures:
- build-on: [amd64]
- build-on: [arm64]
- build-on: [armhf]
- build-on: [ppc64el]
- build-on: [s390x]
parts:
cppcheck:
source-type: git
source: https://github.com/danmar/cppcheck
plugin: cmake
build-packages:
- libboost-all-dev
- libpcre3
- libpcre3-dev
cmake-parameters:
- -DHAVE_RULES=ON
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
- -DUSE_BOOST=On
- -DFILESDIR=/snap/cppcheck/current/usr/local/share/rules
override-build: |
craftctl default
# Set the version
version="$(cat $SNAPCRAFT_PART_SRC/cli/main.cpp| grep -E '\* @version .*' | grep -E -o '([0-9\.]+)')"
craftctl set version="$version"
# Copy the rules
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/local/share/rules/cfg
cp -r $SNAPCRAFT_PART_SRC/cfg/*.cfg $SNAPCRAFT_PART_INSTALL/usr/local/share/rules/cfg/
apps:
cppcheck:
command: usr/local/bin/cppcheck
plugs:
- home
title: Cppcheck
summary: C/C++ static code analyser
description: |
Cppcheck is a static analysis tool for discovering bugs in C and C++
codebases, even when a non-standard syntax is used.
By implementing coding standards such as Mistra C 2012 and providing
extensibility with custom rules, it detects dangerous coding constructs such
as buffer overflows, NULL pointer dereferences, and divisions by zero. At the
same time, Cppcheck tries to minimise the false positive rates.
icon: images/icon.png
issues:
- https://github.com/iosifache/cppcheck-snap/issues
- https://github.com/danmar/cppcheck/issues
license: GPL-3.0
website: https://github.com/iosifache/cppcheck-snap