1
Fork 0

Make JsonEmitter more like HumanEmitter.

Use `derive(Setters)` to derive setters, and then change
`JsonEmitter::new` to only have the arguments that are always used.
This commit is contained in:
Nicholas Nethercote 2024-02-29 16:03:59 +11:00
parent 2999d8dc72
commit 9ff4487999
5 changed files with 32 additions and 58 deletions

View file

@ -48,16 +48,10 @@ fn test_positions(code: &str, span: (u32, u32), expected_output: SpanTestData) {
let output = Arc::new(Mutex::new(Vec::new()));
let je = JsonEmitter::new(
Box::new(Shared { data: output.clone() }),
None,
sm,
None,
fallback_bundle,
true,
true, // pretty
HumanReadableErrorType::Short(ColorConfig::Never),
None,
false,
false,
TerminalUrl::No,
);
let span = Span::with_root_ctxt(BytePos(span.0), BytePos(span.1));