File tree Expand file tree Collapse file tree 7 files changed +114
-131
lines changed Expand file tree Collapse file tree 7 files changed +114
-131
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "analyze" : [
3
+ " -d" ,
4
+ " clang-diagnostic-reserved-macro-identifier" ,
5
+ " -d" ,
6
+ " clang-diagnostic-reserved-identifier" ,
7
+ " -d" ,
8
+ " cert-err33-c" ,
9
+ " -d" ,
10
+ " clang-diagnostic-sign-compare" ,
11
+ " -d" ,
12
+ " clang-diagnostic-implicit-int-float-conversion" ,
13
+ " -d" ,
14
+ " clang-diagnostic-switch-enum" ,
15
+ " --analyzers" ,
16
+ " clangsa" ,
17
+ " clang-tidy" ,
18
+ " gcc" ,
19
+ " -i" ,
20
+ " .codechecker.skipfile"
21
+ ]
22
+ }
Original file line number Diff line number Diff line change
1
+ +*/flutter-pi/src
2
+ -*
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- sudo apt install -y cmake libgl1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libdrm-dev libgbm-dev ttf-mscorefonts-installer fontconfig libsystemd-dev libinput-dev libudev-dev libxkbcommon-dev
4
- mkdir build && cd build
5
- cmake ..
6
- make -j` nproc`
3
+ # gstreamer and libc++ want different versions of libunwind-dev.
4
+ # We explicitly install the version that gstreamer wants so
5
+ # we don't get install errors.
6
+
7
+ sudo apt-get install -y --no-install-recommends \
8
+ git cmake pkg-config ninja-build clang clang-tools \
9
+ libgl-dev libgles-dev libegl-dev libvulkan-dev libdrm-dev libgbm-dev libsystemd-dev libinput-dev libudev-dev libxkbcommon-dev \
10
+ libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
11
+ libunwind-dev
12
+
13
+ $WRAPPER cmake \
14
+ -S . -B build \
15
+ -GNinja \
16
+ -DCMAKE_BUILD_TYPE=Debug \
17
+ -DBUILD_GSTREAMER_VIDEO_PLAYER_PLUGIN=ON \
18
+ -DBUILD_GSTREAMER_AUDIO_PLAYER_PLUGIN=ON \
19
+ -DENABLE_VULKAN=ON \
20
+ -DENABLE_SESSION_SWITCHING=ON \
21
+ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
22
+
23
+ $WRAPPER cmake --build build
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -20,13 +20,18 @@ def codeql_sarif_contain_error(filename):
20
20
rule_index = res ['rule' ]['index' ]
21
21
else :
22
22
continue
23
+
23
24
try :
24
25
rule_level = rules_metadata [rule_index ]['defaultConfiguration' ]['level' ]
25
- except IndexError as e :
26
- print (e , rule_index , len (rules_metadata ))
27
- else :
28
- if rule_level == 'error' :
29
- return True
26
+ except LookupError :
27
+ # According to the SARIF schema (https://www.schemastore.org/schemas/json/sarif-2.1.0-rtm.6.json),
28
+ # the defalt level is "warning" if not specified.
29
+ rule_level = 'warning'
30
+
31
+ if rule_level == 'error' :
32
+ return True
33
+ elif rule_level == 'warning' :
34
+ return True
30
35
return False
31
36
32
37
if __name__ == "__main__" :
Original file line number Diff line number Diff line change
1
+ name : " Static Analysis"
2
+
3
+ on :
4
+ push :
5
+ branches : [ "main", "master" ]
6
+ schedule :
7
+ - cron : ' 0 0 * * *'
8
+ pull_request :
9
+ branches : ' *'
10
+
11
+ jobs :
12
+ codechecker :
13
+ name : CodeChecker
14
+
15
+ # Use latest Ubuntu 24.04 for latest GCC.
16
+ # CodeChecker requires gcc >= 13.0.0.
17
+ # ubuntu-latest is ubuntu 22.04 (atm)
18
+ runs-on : ubuntu-24.04
19
+
20
+ permissions :
21
+ actions : read
22
+ contents : read
23
+ security-events : write
24
+
25
+ steps :
26
+ - name : Checkout repository
27
+ uses : actions/checkout@v4
28
+ with :
29
+ submodules : recursive
30
+
31
+ - name : Install Deps, Configure and Build
32
+ run : |
33
+ ./.github/workflows/codeql-buildscript.sh
34
+
35
+ - name : Run CodeChecker
36
+ uses : ardera/CodeChecker-Action@master
37
+ id : codechecker
38
+ with :
39
+ ctu : true
40
+ logfile : ${{ github.workspace }}/build/compile_commands.json
41
+ config : ${{ github.workspace }}/.codechecker.json
42
+
43
+ - uses : actions/upload-artifact@v4
44
+ id : upload
45
+ with :
46
+ name : " CodeChecker Bug Reports"
47
+ path : ${{ steps.codechecker.outputs.result-html-dir }}
48
+
49
+ - name : Fail on Warnings
50
+ if : ${{ steps.codechecker.outputs.warnings == 'true' }}
51
+ run : |
52
+ cat <<EOF >>$GITHUB_STEP_SUMMARY
53
+ ## ⚠️ CodeChecker found warnings
54
+ Please see the 'CodeChecker Bug Reports' artifact for more details:
55
+ - ${{ steps.upload.outputs.artifact-url }}
56
+ EOF
57
+
58
+ exit 1
Original file line number Diff line number Diff line change 1
1
/.vscode
2
2
/build
3
3
/out
4
+ /.codechecker
4
5
5
6
# CMake docs says it should not be checked in.
6
7
CMakeUserPresets.json
You can’t perform that action at this time.
0 commit comments