feat(ReedSolomon): decode-outcome iff for Gao decoding (#268) #14
This file contains hidden or 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: Lint Style | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| push: | |
| branches: [main, master] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Need full history to detect changed files | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Get changed Lean files | |
| id: changed-files | |
| run: | | |
| if [ "${{ github.event_name }}" == "pull_request" ]; then | |
| # For PRs, compare against the base branch | |
| BASE_SHA="${{ github.event.pull_request.base.sha }}" | |
| HEAD_SHA="${{ github.sha }}" | |
| else | |
| # For pushes, compare against the previous commit | |
| BASE_SHA="${{ github.event.before }}" | |
| HEAD_SHA="${{ github.sha }}" | |
| fi | |
| # Get list of changed .lean files (one per line) | |
| CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB "$BASE_SHA" "$HEAD_SHA" | grep '\.lean$' || true) | |
| if [ -z "$CHANGED_FILES" ]; then | |
| echo "No changed Lean files found" | |
| echo "has_files=false" >> $GITHUB_OUTPUT | |
| else | |
| # Save to file for use in next step | |
| echo "$CHANGED_FILES" > changed_files.txt | |
| echo "has_files=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Run style linter | |
| run: | | |
| # Ensure style-exceptions.txt exists (even if empty) | |
| touch scripts/style-exceptions.txt | |
| if [ "${{ steps.changed-files.outputs.has_files }}" != "true" ]; then | |
| echo "No changed Lean files to lint" | |
| exit 0 | |
| fi | |
| # Run linter on changed files only (one file per line) | |
| # The script will exit with code 1 if there are any errors not in style-exceptions.txt | |
| # This will cause the CI check to fail | |
| cat changed_files.txt | xargs -r python3 scripts/lint-style.py |