Fix C and C++ standard violation #131
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2021-2022 TiaC Systems | |
# SPDX-License-Identifier: Apache-2.0 | |
name: QA License Check | |
on: | |
workflow_dispatch: # And manually on button click | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
qa-licenses: | |
name: Run scancode for licenses | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v3 | |
- name: Scan the code | |
uses: zephyrproject-rtos/action_scancode@v4 | |
id: scancode | |
with: | |
directory-to-scan: 'scan/' | |
- name: Upload results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: scancode | |
path: ./artifacts | |
- name: Verify results | |
run: | | |
if [ -s ./artifacts/report.txt ]; then | |
report=$(cat ./artifacts/report.txt) | |
report="${report//'%'/'%25'}" | |
report="${report//$'\n'/'%0A'}" | |
report="${report//$'\r'/'%0D'}" | |
echo "::error file=./artifacts/report.txt::$report" | |
exit 1 | |
fi |