Fix wsl_v5 lint errors and enforce lint on PR CI

Add missing blank lines around if-block boundaries in two files
to satisfy wsl_v5, and make lint-go and lint-js fail the build on
pull requests (not only on push to main) by always running the
strict lint and using reviewdog purely for inline annotations.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-05-20 16:49:42 +02:00
parent 9e61e5e1b7
commit 3e82b64f01
3 changed files with 14 additions and 15 deletions

View File

@@ -274,15 +274,14 @@ jobs:
exit 1
fi
- name: "Run golangci-lint"
run: golangci-lint run ./...
- name: "Annotate PR with golangci-lint findings"
if: failure() && github.event_name == 'pull_request'
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
golangci-lint run --out-format=line-number ./... 2>&1 | \
reviewdog -f=golangci-lint -reporter=github-pr-review -filter-mode=nofilter -fail-level=error -name="golangci-lint"
else
golangci-lint run ./...
fi
golangci-lint run --out-format=line-number ./... 2>&1 | \
reviewdog -f=golangci-lint -reporter=github-pr-review -filter-mode=nofilter -name="golangci-lint" || true
lint-js:
name: "lint-js"
@@ -302,18 +301,16 @@ jobs:
- name: "Generate Relay artifacts"
run: make relay
- name: "Run eslint"
run: npm run lint
- name: "Annotate PR with eslint findings"
if: failure() && github.event_name == 'pull_request'
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
for dir in apps/console apps/trust packages/ui packages/eslint-config; do
(cd "$dir" && npx eslint . --concurrency 4 --format stylish 2>/dev/null) | \
reviewdog -f=eslint -reporter=github-pr-review -filter-mode=nofilter -fail-level=error -name="eslint ($dir)"
done
(cd packages/n8n-node && npx n8n-node lint)
else
npm run lint
fi
for dir in apps/console apps/trust packages/ui packages/eslint-config; do
(cd "$dir" && npx eslint . --concurrency 4 --format stylish 2>/dev/null) | \
reviewdog -f=eslint -reporter=github-pr-review -filter-mode=nofilter -name="eslint ($dir)" || true
done
test:
name: "test"