Skip to content

Commit 363c9d1

Browse files
rwalton-armPatater
authored andcommitted
ci: Add scancode github action
Use the zephyr project's `scancode` github action to scan our code for license header violations.
1 parent 6b88ec4 commit 363c9d1

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

.github/license_config.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
license:
2+
main: apache-2.0
3+
category: Permissive
4+
exclude:
5+
extensions:
6+
- yml
7+
- yaml
8+
- html
9+
- rst
10+
- conf
11+
- cfg
12+
- ini
13+
- toml
14+
- in
15+
- txt
16+
langs:
17+
- HTML

.github/workflows/scancode.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Scancode
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
scancode_job:
7+
runs-on: ubuntu-latest
8+
name: Scan code for licenses
9+
steps:
10+
- uses: actions/checkout@v1
11+
- name: Scan the code
12+
id: scancode
13+
uses: zephyrproject-rtos/action_scancode@v1
14+
with:
15+
directory-to-scan: 'scan/'
16+
- name: Artifact Upload
17+
uses: actions/upload-artifact@v1
18+
with:
19+
name: scancode
20+
path: ./artifacts
21+
22+
- name: Verify
23+
run: |
24+
test ! -s ./artifacts/report.txt || (cat ./artifacts/report.txt && exit 1 )

news/202201101535.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove `licenseheaders` tool and replace it with `scancode`.

0 commit comments

Comments
 (0)