From a3dcc274d0308371fab3a4ac1bd57775e4600a80 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Wed, 28 May 2025 15:30:45 +0530 Subject: [PATCH] Strip PWD --- .github/workflows/swiftlint.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/swiftlint.yml b/.github/workflows/swiftlint.yml index 4404567..6e1b167 100644 --- a/.github/workflows/swiftlint.yml +++ b/.github/workflows/swiftlint.yml @@ -10,6 +10,12 @@ jobs: steps: - uses: actions/checkout@v1 - name: Lint + # based on https://github.com/norio-nomura/action-swiftlint run: | + function stripPWD() { + ! ${WORKING_DIRECTORY+false} && cd - > /dev/null + sed -E "s/$(pwd|sed 's/\//\\\//g')\///" + } swiftlint | \ + stripPWD | \ sed -E 's/^(.*):([0-9]+):([0-9]+): (warning|error|[^:]+): (.*)/::\4 file=\1,line=\2,col=\3::\5/'