Skip to content

Commit 89cf4f7

Browse files
committed
adds code scanning with CodeQL
1 parent 5dca3eb commit 89cf4f7

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Static code analysis
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
workflow_dispatch:
9+
10+
jobs:
11+
codeql:
12+
name: Scan code with CodeQL
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v2
18+
19+
- name: Initialize CodeQL
20+
uses: github/codeql-action/init@v1
21+
with:
22+
languages: cpp
23+
queries: security-and-quality
24+
25+
- name: Build problem solvers
26+
run: |
27+
IFS=$'\n'
28+
for makefile in $(find . -name Makefile)
29+
do
30+
make -C "$(dirname "$makefile")"
31+
done
32+
33+
- name: Perform CodeQL analysis
34+
uses: github/codeql-action/analyze@v1

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
![Functional tests](https://github.com/dassencio/cracking-the-coding-interview/workflows/Functional%20tests/badge.svg)
2+
![Static code analysis](https://github.com/dassencio/cracking-the-coding-interview/workflows/Static%20code%20analysis/badge.svg)
23

34
# Description
45

0 commit comments

Comments
 (0)