Urgent.News

What's breaking now, across thousands of outlets.

Tech

Show svelte-check's errors in your GitLab merge requests (and GitHub pull requests)

If your SvelteKit project runs svelte-check in CI, you've probably seen this: the job fails, and the type errors are somewhere in the job log. Reviewers have to open the log, scroll, and map each line back to the diff. Meanwhile, ESLint's errors show up right in the merge request, because ESLint has formatters for GitLab and GitHub. svelte-check doesn't, and that's on purpose: its maintainers…

If a SvelteKit project runs svelte-check in CI, the job may fail and the type errors can be found in the job log. Reviewers must open the log, scroll, and match each line back to the diff. ESLint errors, however, appear directly in the merge request because ESLint offers GitLab and GitHub formatters. svelte-check does not have this capability, and that's by design: its maintainers avoid adding output formats and prefer machine-readable output.

The post explains how to convert svelte-check's output into a report that can be shown in GitLab and GitHub merge requests. With the --output machine-verbose flag, svelte-check prints one JSON diagnostic per line, including file, range, message, code, and whether it's an error or warning. GitLab uses a Code Quality report, a JSON file declared as an artifact, to display problems in a merge request.

Comparing the merge request's report with the target branch's report, GitLab lists only the problems added by the merge request and those it fixes. A tricky part is the fingerprint field, which GitLab uses to differentiate new problems from existing ones. The reporter computes a hash of the file, error code, and message without the line number, preventing every error from being marked as new when a line is added.

However, two identical errors in the same file would have the same fingerprint, differentiated only by their order in the file. The reporter can prefix messages to distinguish them from other tools in the widget, and this prefix is not part of the fingerprint. GitHub offers two ways to display errors on a pull request's diff: annotations and code scanning.

Annotations require no additional command and can be used in any repository, but GitHub doesn't compare them with the base branch, and there's a limit of 10 error and 10 warning annotations per step. Code scanning uses a SARIF file, uploaded with the github/codeql-action/upload-sarif action, and compares each pull request with the base branch. It only comments on the problems added by the pull request and doesn't have a limit.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

When algorithmic curation meets visual reeducation: my journey with Amblyotube on Meta Quest

When algorithmic curation meets visual reeducation: my journey with Amblyotube on Meta Quest I discovered the HackerTV post on Hacker News one Tuesday evening, around 10:30 PM, the kind of hour when…

  • Algorithmic curation and visual rehabilitation met in Amblyotube project for Meta Quest.
  • 14-year-old Thomas suffered moderate amblyopia in left eye, requiring 2-hour daily patching.
  • Amblyotube transformed YouTube videos into dichoptic vision training sessions using VR headset.

The Missing Hour and the Repeated Hour: What the Time Zone Planner Does on the Four 2026 Clock-Change Dates

I work on OnePassApps, the team behind app.onepassapps.com, so this is our own app measured on our own build. Three of our earlier posts on the Time Zone Planner covered the two-place plan, the…

  • On March 7 and 8, 2026, New York experienced two different GMT offsets (GMT-5 and GMT-4)
  • On March 29, London skipped an hour (01:00 to 01:59) due to moving to BST
  • On October 25, London repeated an hour (01:00 to 01:30) when reverting to GMT-4

호주 고등법원이 16세 미만 청소년의 소셜미디어 사용 금지를 심의 중입니다. 디지털 웰빙을 위한 중요한 논의지만, '화면 시간' 자체를 줄이는 것만이 정답일...

호주 고등법원이 16세 미만 청소년의 소셜미디어 사용 금지를 심의 중입니다. 디지털 웰빙을 위한 중요한 논의지만, '화면 시간' 자체를 줄이는 것만이 정답일... 호주 16세 미만 SNS 금지 논의, 개발자 시선에서 본 '건강한 화면 시간'의 기술적 대안 호주 고등법원이 16세 미만 청소년의 소셜미디어 사용 금지를 심의 중이라는 소식을 접하고, 문득 내…

More from Sunday 8 November →