Repository navigation
v0.2.2
Implements Synod 0.2. Errors now look like a good compiler's: on a terminal,
every compile-time and run-time error shows the source line, underlines the
exact problem, points at related places ("first defined here", "called from
node context here", "this is 0") and shows the fix as a diff. Piped output,
which agents and CI read, is unchanged byte for byte.
Added
--style rich|shortand--color auto|always|neveronsynod fmt,checkandrun(both--flag valueand--flag=value; a bad value exits 2). Rich output draws the source line with markers, labels, notes and help under the unchanged first line; it is the default when the destination is a terminal. Piped or redirected output stays the one-line form byte for byte. Color needsNO_COLORunset or empty andTERMother thandumb; the flags beat the environment.--jsonignores both flags.synod runfailures render a snippet under thefailed at …line in rich style.check.jsondiagnostics gainend, andlabel,labels,help(with edits) andnoteswhen present; the format stayssynod-check/1.- A diagnostic without a position prints as
path: error[code]: message. - Fixes shown under
help:for missing parentheses, imports to add, remove
or rename, the package header, canonical form, receivers,sim.Nobody,
"did you mean" names and more; each is tested to remove its error. - Hidden control and bidi characters in source are neutralised in snippets,
so a file cannot inject terminal escapes. - Golden cases of
testdata/checkhaveexpect-rich.txtandexpect.jsonnext toexpect.txt;testdata/run/errorscases haveexpect-rich.txt.