fixup! test: added endian util function tests #15
Workflow file for this run
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
name: Static Code Analysis | |
on: [push] | |
jobs: | |
static_code_analysis: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: | | |
sudo apt install cppcheck | |
sudo apt install dos2unix | |
sudo apt install python3 | |
sudo apt remove clang-format-10 | |
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" | |
sudo ln -s /bin/clang-format-17 /bin/clang-format | |
- name: Style | |
run: | | |
chmod +x ./scripts/run-clang-format.sh | |
dos2unix ./scripts/run-clang-format.sh | |
cd $GITHUB_WORKSPACE/ | |
./scripts/run-clang-format.sh | |
echo "Style check complete" | |
cd - | |
- name: Check General Rules | |
run: cppcheck --enable=all -I "./lib/include" --error-exitcode=1 --suppress=missingIncludeSystem ./lib | |
- name: Check MISRA 2012 Rules | |
run: | | |
cd $GITHUB_WORKSPACE/scripts/misra/ | |
mkdir .results | |
chmod +x check_misra.sh | |
dos2unix check_misra.sh | |
./check_misra.sh -c /usr/bin -o ./.results -q | |
echo "Scan complete" | |
NumViolations=`cat .results/error_count` | |
echo $NumViolations | |
echo "VIOLATIONS=$NumViolations" >> $GITHUB_ENV | |
ls $GITHUB_WORKSPACE/misra/.results/ |