mix compile.diagnostics (client_utils v0.1.17)
View SourceRegisters after_compiler hooks that write diagnostics to a JSONL file.
Add :diagnostics as the first compiler so the hooks are registered
before :elixir runs. This ensures diagnostics are written even when a
syntax error aborts the compiler chain.
def project do
[
compilers: [:diagnostics] ++ Mix.compilers() ++ [:spex],
diagnostics: [output: "diagnostics.jsonl"],
...
]
endOptions
:output- output file path, defaults to"diagnostics.jsonl". Can also be set via theDIAGNOSTICS_OUTPUTenv var.
Project configuration
Options can be set under the :diagnostics key:
def project do
[
compilers: [:diagnostics] ++ Mix.compilers() ++ [:spex],
diagnostics: [output: "build/diagnostics.jsonl"],
...
]
end
Summary
Functions
Writes diagnostics to the output file.