Skip to content

🩹 Fix regexes and memory leaks #30

🩹 Fix regexes and memory leaks

🩹 Fix regexes and memory leaks #30

Workflow file for this run

name: 🩺 Checks
on:
pull_request:
branches:
- master
- main
jobs:
lint:
name: 🕵️ Lint
runs-on: ubuntu-latest
container:
image: ghcr.io/epitech/coding-style-checker:latest
steps:
- name: 🛬 Clone original repository
uses: actions/checkout@v3
- name: 🏃‍ Run checker
run: check.sh $(pwd) $(pwd)
- name: 🚨 Report errors and warnings
shell: bash
run: |
ERROR_COUNT=$(wc -l coding-style-reports.log | cut -d' ' -f1)
while read line
do
FILE=$(echo ${line} | cut -d':' -f 1)
LINE=$(echo ${line} | cut -d':' -f 2)
TYPE=$(echo ${line} | cut -d':' -f 3)
CODE=$(echo ${line} | cut -d':' -f 4)
echo "::error file=${FILE},line=${LINE},title=${TYPE} coding style error::${CODE}"
done < coding-style-reports.log
if [ $ERROR_COUNT -gt 0 ]; then
exit 1
fi
- name: 🧹 Clean up
run: rm coding-style-reports.log
build:
name: 🏗️ Build
runs-on: ubuntu-latest
needs: lint
steps:
- name: 🛬 Clone original repository
uses: actions/checkout@v3
- name: 🏗️ Build program
run: make
- name: 🔍️ Check binary
run: |
if [ -x "nanotekspice" ]; then
printf "### :hammer: Build\n\n:heavy_check_mark: Program built successfully." >> $GITHUB_STEP_SUMMARY
else
printf "### :hammer: Build\n\n:x: Program failed to build." >> $GITHUB_STEP_SUMMARY
exit 1
fi