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/'