mirror of
https://github.com/apple/pkl.git
synced 2026-03-21 00:29:07 +01:00
Add color to error formatting (#746)
* Add color to error formatting * Apply suggestions from code review Co-authored-by: Daniel Chao <daniel.h.chao@gmail.com> * Address reviewer comments * Apply suggestions from code review Co-authored-by: Daniel Chao <daniel.h.chao@gmail.com> * Define style choices as operations on formatter (abandon semantic API) * Adjust margin styling * Review feedback * Documentation nits --------- Co-authored-by: Daniel Chao <daniel.h.chao@gmail.com>
This commit is contained in:
committed by
GitHub
parent
e217cfcd6f
commit
03462fefae
@@ -19,6 +19,19 @@ Patterns are matched against the beginning of resource URIs.
|
||||
At least one pattern needs to match for a resource to be readable.
|
||||
====
|
||||
|
||||
[[color]]
|
||||
.--color
|
||||
[%collapsible]
|
||||
====
|
||||
Default: `auto` +
|
||||
When to format messages with ANSI color codes.
|
||||
Possible values:
|
||||
|
||||
- `"never"`: Never format
|
||||
- `"auto"`: Format if `stdin`, `stdout`, or `stderr` are connected to a console.
|
||||
- `"always"`: Always format
|
||||
====
|
||||
|
||||
[[cache-dir]]
|
||||
.--cache-dir
|
||||
[%collapsible]
|
||||
|
||||
@@ -67,6 +67,13 @@ The cache directory for storing packages.
|
||||
If `null`, defaults to `~/.pkl/cache`.
|
||||
====
|
||||
|
||||
.color: Property<Boolean>
|
||||
[%collapsible]
|
||||
====
|
||||
Default: `false` +
|
||||
Format messages using ANSI color.
|
||||
====
|
||||
|
||||
.noCache: Property<Boolean>
|
||||
[%collapsible]
|
||||
====
|
||||
|
||||
@@ -96,7 +96,8 @@ class DocSnippetTestsEngine : HierarchicalTestEngine<DocSnippetTestsEngine.Execu
|
||||
null,
|
||||
null,
|
||||
IoUtils.getCurrentWorkingDir(),
|
||||
StackFrameTransformers.defaultTransformer
|
||||
StackFrameTransformers.defaultTransformer,
|
||||
false,
|
||||
)
|
||||
return ExecutionContext(replServer)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user