-
Notifications
You must be signed in to change notification settings - Fork 171
43 lines (36 loc) · 1.1 KB
/
snippets_checks.yml
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
# This workflow performs the checks like license check,
# doxygen, unit tests etc.
name: Snippets Checks
on:
pull_request:
workflow_dispatch:
push:
branches:
- development
jobs:
Snippets-check:
runs-on: ubuntu-latest
container:
image: ghcr.io/armmbed/mbed-os-env:master-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: clone mbed-os
run: git clone https://github.com/armmbed/mbed-os.git
- name: add mbed_app.json
run: |
echo '{ "target_overrides": { "K64F": { "target.features_add": ["BLE"] } } }' > mbed_app.json
- name: validate code snippets
run: ./check_tools/find_bad_code_snippets.sh
- name: find remaining TODOs
run: |
TODO_COUNT=0
for f in $(find -name mbed-os -prune -o -name '*.md' -print)
do
for l in $(sed -n '/```.*TODO/I=' $f)
do
echo "TODO in $f line $l"
TODO_COUNT=$(expr $TODO_COUNT + 1)
done
done
echo "Total number of TODOs: $TODO_COUNT"