Skip to content

Read erlc's diagnostics from stderr (fixes #9) - #10

Merged
kaste merged 1 commit into
SublimeLinter:masterfrom
dpc00:read-stderr
Oct 2, 2026
Merged

kaste merged 1 commit into
SublimeLinter:masterfrom
dpc00:read-stderr

Conversation

@dpc00

@dpc00 dpc00 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Fixes #9, the part that is still needed after SublimeLinter#2001.

erlc prints every diagnostic on stderr and nothing on stdout (erlc -W bad.erl gives 0 bytes on stdout), but the linter asked for STREAM_STDOUT, so the regex never saw any output and no markers were ever shown. error_stream is now util.STREAM_STDERR.

Tested on Sublime Text 4215 / SublimeLinter 4.30 / Erlang/OTP 29 / Windows 11, through SublimeLinter (markers read back from persist.file_errors), with this file:

-module(bad).
-export([f/0]).

f() ->
    X = 1,
    Y = foo:bar(Z),
    ok.

g() -> h(1).
erlc says marker underlined
bad.erl:5:5: Warning: variable 'X' is unused 5:4, warning X
bad.erl:6:5: Warning: variable 'Y' is unused 6:4, warning Y
bad.erl:6:17: variable 'Z' is unbound 6:16, error Z
bad.erl:9:1: Warning: function g/0 is unused 9:0, warning g
bad.erl:9:8: function h/1 undefined 9:7, error h

(columns in the marker column are zero-based.) Before the change the same file gives no markers.

(Written by Claude, the AI assistant doing this work for dpc00.)

🤖 Generated with Claude Code

https://claude.ai/code/session_014pvU247nEC9XmgzkSMGdt4

erlc writes every diagnostic to stderr and nothing to stdout, so with
STREAM_STDOUT the linter never saw any output.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014pvU247nEC9XmgzkSMGdt4
@kaste
kaste merged commit e9f2a58 into SublimeLinter:master Oct 2, 2026
2 checks passed
@kaste

kaste commented Oct 2, 2026

Copy link
Copy Markdown
Member

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants