Commit Graph

106 Commits

Author SHA1 Message Date
Paul Colomiets 52e5ec8064
fix(chain): correct `Chain` structure exported (#102)
This fixes all current complier and clippy warnings.
2022-01-07 17:34:39 -08:00
dvermd 53b246829a
feat(handlers): Add JSON handler (#90) 2021-11-15 08:49:22 -08:00
Kirill Vasiltsov 1f70140c2e
feat(tabs): Add replace tabs with spaces option (#82)
Fixes: https://github.com/zkat/miette/issues/73
2021-10-05 21:05:57 -07:00
Antoine Muller cb5a919deb
fix(read_span): prevent multilines MietteSpanContents from skipping lines (#81)
Fixes: https://github.com/zkat/miette/issues/76
2021-10-05 21:05:50 -07:00
Coenen Benjamin 0169fe20e7
feat(SourceSpan): add impl From<Range> (#78)
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2021-10-01 12:02:39 -07:00
Kat Marchán bb25edf019
docs: fix doctests 2021-09-26 13:00:39 -07:00
Kat Marchán 47e4d4d05c
docs: add docs for handler options 2021-09-26 12:45:18 -07:00
Kat Marchán 3213fa610a feat(narrated): global footer and related diagnostics support 2021-09-22 16:34:21 -07:00
Kat Marchán 612967d381 fix(deps): remove dep on itertools 2021-09-22 16:34:21 -07:00
Kat Marchán fbf6664ef5 feat(narrated): updated narrated handler 2021-09-22 16:34:21 -07:00
Kat Marchán b33084bdbf feat(handler): context lines config support 2021-09-22 16:34:21 -07:00
Kat Marchán b10693a91c tests: fix doctests and such 2021-09-22 16:34:21 -07:00
Kat Marchán eea5c29935 fix(read_span): fix off-by-one issue 2021-09-22 16:34:21 -07:00
Kat Marchán 77c5899bbd fix(graphical): render URLs even without a code 2021-09-22 16:34:21 -07:00
Kat Marchán ce0dea541a fix(theme): remove code styling 2021-09-22 16:34:21 -07:00
Kat Marchán 717f8e3d88 feat(graphical): add theming customization for linums 2021-09-22 16:34:21 -07:00
JT a69020422e fix(graphical): Fix off-by-one span_applies calculation (#70)
This changes the span_applies calculation to only count spans where the end of the span is considered part of it if the underline spills into it. I believe this happens if, say, the span.offset() is 10 and span.len() is 2, then we want to count offsets 10 and 11 as part of the span and those would spill, but not 12 as it's the "one past the end" where we know when to stop underlining.
2021-09-22 16:34:21 -07:00
Kat Marchán 55ca8e0b7f fix(api): put panic handler properly behind a flag 2021-09-22 16:34:21 -07:00
Kat Marchán 72c0bb9e65 feat(graphical): compact even more 2021-09-22 16:34:21 -07:00
Kat Marchán 41cb710a7d fix(context): get labels/snippets working when using .context() 2021-09-22 16:34:21 -07:00
Kat Marchán db637a366b feat(graphical): compact graphical display a bit 2021-09-22 16:34:21 -07:00
Kat Marchán 8e11baab7b feat(related): Add related diagnostics (#68)
Fixes: https://github.com/zkat/miette/issues/47
2021-09-22 16:34:21 -07:00
Kat Marchán 18e0ed7749 fix(graphical): fix coalescing adjacent things when they cross boundaries 2021-09-22 16:34:21 -07:00
Kat Marchán 6c6484633e feat(graphical): simplify graphical header and remove a dep 2021-09-22 16:34:21 -07:00
Kat Marchán e2e4027fda fix(graphical): stop rendering red vbars before the last item 2021-09-22 16:34:21 -07:00
Kat Marchán 858ac16935 feat(panic): add backtrace support to panic handler and move set_panic_hook into fancy features 2021-09-22 16:34:21 -07:00
Kat Marchán c6daee7b93 feat(panic): Add basic panic handler and installation function
Fixes: https://github.com/zkat/miette/issues/22
2021-09-22 16:34:21 -07:00
Kat Marchán 2cff68449c misc: remove stale comment 2021-09-22 16:34:21 -07:00
Kat Marchán 1a0f359e3c feat(report): nicer, non-overlapping same-line highlights 2021-09-22 16:34:21 -07:00
Kat Marchán 4bb9d12102 feat(handlers): Update graphical handler to use new label protocol (#66) 2021-09-22 16:34:21 -07:00
Kat Marchán 9aa8ff0d31 feat(protocol): Make SourceCode Send+Sync 2021-09-22 16:34:21 -07:00
Kat Marchán f87b158b22 feat(labels): replace snippet stuff with simpler labels (#62) 2021-09-22 16:34:21 -07:00
Kat Marchán 9841d6fd77 feat(report): add debug report as default, instead of narrated one 2021-09-22 16:34:21 -07:00
Kat Marchán c3505fac26 fix(protocol): implement source/cause for Box<dyn Diagnostic> 2021-09-22 16:34:21 -07:00
Kat Marchán 2c43740346 feat(theme): more styling changes 2021-09-22 16:34:21 -07:00
Kat Marchán c5c0576ec6 feat(theme): rename some theme items for clarity
BREAKING CHANGE: These were part of the public API, so if you were using theming, this might have broken for you
2021-09-22 16:34:21 -07:00
Kat Marchán 93374173e3 feat(footer): add footer support to graphical and narrated
Fixes: https://github.com/zkat/miette/issues/34
2021-09-22 16:34:21 -07:00
Kat Marchán 247e8f8b39 feat(deps): move fancy reporter (and its deps) to a feature
BREAKING CHANGE: The default fancy reporter is no longer available unless you enable the "fancy" feature. This also means you will not be pulling in a bunch of deps if you are using miette for a library

Fixes: https://github.com/zkat/miette/issues/25
2021-09-22 16:34:21 -07:00
Kat Marchán 4c2463f9ae feat(report): make a single big MietteHandler that can switch modes
BREAKING CHANGE: linkification option method on GraphicalReportHandler has been changed to .with_links(bool)
2021-09-22 16:34:21 -07:00
Kat Marchán 80036781cd fix(report): miscellaneous, hacky tweaks to graphical rendering 2021-09-22 16:34:21 -07:00
Kat Marchán 673b435892
tests: remove compile_tests 2021-09-13 18:33:13 -07:00
Cormac Relf 2fa5551c81
feat(derive): Add `#[diagnostic(forward(field_name), code(...))]` (#41) 2021-09-13 15:39:04 -07:00
Robin Appelman d994add912
fix(report): Fix end of previous line wrongly being included in highlight (#52) 2021-09-13 09:57:54 -07:00
Kat Marchán eb07d5bd66
fix(report): fix wrapping for header and add wrapping for footer 2021-09-11 00:57:53 -07:00
Kat Marchán eaebde92cf
feat(report): make header line as wide as terminal 2021-09-10 17:09:52 -07:00
Kat Marchán bc72532465
feat(report): take terminal width into account for wrapping text 2021-09-10 12:39:10 -07:00
Kat Marchán f482dcec6a
feat(report): wrap multiline messages to keep formatting
Fixes: https://github.com/zkat/miette/issues/51
2021-09-10 08:16:40 -07:00
Kat Marchán 1ba3f2f5d2
fix(report): get rid of the weird arrow thing. it does not look good 2021-09-10 07:36:09 -07:00
Kat Marchán e4fdac38ea
fix(context): pass on diagnostic metadata when wrapping with `Report` 2021-09-09 20:27:27 -07:00
Kat Marchán 533ff5f348
fix(reporter): improve color situation and style things a little nicer 2021-09-08 20:59:19 -07:00