From 8fccf97b09eb9928bbdb827cd70500addeeca78b Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 10 Jun 2025 14:27:36 +0200 Subject: [PATCH] Fix blanks --- .github/workflows/onpush_superlinter.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/onpush_superlinter.yml b/.github/workflows/onpush_superlinter.yml index 6c42a84b9..a51154f6d 100644 --- a/.github/workflows/onpush_superlinter.yml +++ b/.github/workflows/onpush_superlinter.yml @@ -1,10 +1,3 @@ -# This workflow executes several linters on changed files based on languages used in your code base whenever -# you push a code or open a pull request. -# -# You can adjust the behavior by modifying this file. -# For more information, see: -# https://github.com/github/super-linter ---- name: Lint On Change on: @@ -12,17 +5,30 @@ on: branches: [ master ] pull_request: branches: [ master ] -jobs: +jobs: run-lint: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 with: - # Full git history is needed to get a proper list of changed files within `super-linter` fetch-depth: 0 + - name: Fix non-breaking spaces + run: | + echo "Replacing non-breaking spaces (U+00A0) with regular spaces..." + find . -type f -not -path "./.git/*" -exec sed -i 's/\xC2\xA0/ /g' {} + + if [[ -n "$(git status --porcelain)" ]]; then + git config user.name "github-actions" + git config user.email "github-actions@github.com" + git add . + git commit -m "fix: replace non-breaking spaces with regular spaces" + git push + else + echo "No changes to commit." + fi + - name: Lint Code Base uses: super-linter/super-linter/slim@main env: