Skip to content

clean

clean #13

Workflow file for this run

name: MATLAB Code Quality
on:
push:
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
name: MATLAB Lint
steps:
- uses: actions/checkout@v4
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v2
- name: Run MATLAB Code Analyzer
uses: matlab-actions/run-command@v2
with:
command: addpath('.github/scripts'); lint
- name: Upload lint log
if: always()
uses: actions/upload-artifact@v4
with:
name: matlab-lint-log
path: .github/scripts/lint.log
if-no-files-found: ignore
format:
runs-on: ubuntu-latest
name: MATLAB Format Check
steps:
- uses: actions/checkout@v4
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v2
- name: Run formatter and check for changes
uses: matlab-actions/run-command@v2
with:
command: format_code
- name: Check if formatting changed any files
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "❌ Code is not properly formatted!"
echo "The following files need formatting:"
git status --porcelain
echo ""
echo "🔧 To fix locally, run: ./format.sh"
echo ""
echo "📋 Diff of required changes:"
git diff
exit 1
else
echo "✅ All code is properly formatted!"
fi