Commit 6a7e148
authored
Improve default diagnostic formatter (#535)
* Improve default diagnostic formatter
* Fix suggestion display ordering
* Highlight output only when connected to termnial
* Highlight diagnostic summary only when connected to terminal
* Fix exisiting tests to use tools output formatting option
* Add default diagnostic formatting tests
* Relocate default diagnostic formatting test to a separate file
* Remove URL force unwrapping
* Refactor formatted description for diagnostic
* Refactor suggestion grouping
* Remove redundant ANSIAnnotation color reset
* Improve suggestion vertical alignment prefix
* Revert public initializer changes
To make it easier to fix the formatter abstraction later, we keep the previous public initializer unchanged and add a new internal initializer that accept all 4 arguments.
* Clean up source lines after writing the diagnostics
Since the sourceLines could potentially be big if there were diagnostics in many large files, we remove the cached lines after the console writer finished writing the diagnostics.
* Improve inline documentation
* Clean up source lines cache after all diagnostics have been formatted
Introduces an API to inform the formatter that all diagnostics have been formatted.
* Improve C import
The previous import solution was working only for Darwin platforms, it needed to be update to support more platforms.
* Revert whitespace change
A trailing whitespace is added in `TestTutorial.tutorial:42`, this is expected and should not have been removed.
* Revert "Revert public initializer changes"
This reverts commit 6e1d037.1 parent 09ad847 commit 6a7e148
File tree
15 files changed
+795
-73
lines changed- Sources
- SwiftDocCUtilities/Action/Actions
- Convert
- SwiftDocC/Infrastructure/Diagnostics
- Tests/SwiftDocCTests
- Diagnostics
- Semantics/General Purpose Analyses
15 files changed
+795
-73
lines changedLines changed: 57 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
0 commit comments