This is the natural extension of #513 which already removed a lot of regex parsing.
The `ExceptionParser` class is renamed into `ExceptionConverter` because there is no more string parsing performed at all. `Exception` is converted into `ExceptionInfo` and `StackFrame` is converted into `StackFrameInfo`.
I kept running into https://github.com/JosefPihrt/Roslynator/issues/833 when using Rider, but it seems this was fixed in version 3.2 thanks to a fix in how they are doing assemblies. Looks like this would also include benefits for people using VS2022 too
* Updating doc build dependencies
Updates playwright to latest version. This requires an update in how it is ran as part of the statiq build set up to ensure dependencies exist for the run.
Also brings misc packages up to date to fix vulnerabilities.
* Updates CI to use node v16 and dotnet 5
Playwright CLI currently needs net5 to execute. There is a PR in the works to get it running on net6 but until then the recommended steps it to have both installed.
CommandOptions now has an IsHidden property that, when set to true, will cause the option to be hidden from the following cases:
- Help text using `-h|--help`
- Xml representations generated with the `cli xml` command
- Diagnostics displayed with the `cli explain` command
Hidden options can still be outputted with `cli explain` using the `--hidden` option that is also used to display hidden commands.
Fixes#631
The generic parameters were double escaped and would display as `[[T0,T1,TRet]]` instead of `[T0,T1,TRet]`. This is because the `builder.AppendWithStyle` method already escapes its value so the caller must not escape the passed value.
and does not throw on unresolvable types.
Also changed the TypeResolverAdapter to adhere
to those expectations and removed the now no longer
needed try-catch from CommandPropertyBinder.
If the item contained escaped markup, after the call to RemoveMarkup
the string will contain unescaped markup (that the user explicitly had
escaped before) for those cases we need to escape all remaining markup.
* Invert `#if NET5_0` conditions so that when adding net6.0 target framework, the _new_ APIs are used.
* Use `NET5_0_OR_GREATER` instead of `NET5_0` to ensure consistent behaviour on future target frameworks.
When merging a large amount of segments together we were doing a tremendous amount of allocation especially related to strings due to concatination.
This adds an internal SegmentBuilder that uses a stringbuilder for building up the text rather than creating a new instance and doing a concat operation for each segment.
The style parameter is actually nullable. Also, the documentation of the style parameter has been made explicit that `Style.Plain` is used when a `null` style is passed.
When running on .NET Framework, the `Should_Report_Max_Remaining_Time_For_Extremely_Small_Progress` would intermittently fail with the following error:
```
task.RemainingTime
should be
10675199.02:48:05.4775807
but was
null
```
This is because it's possible that the two increment share the same timestamp thus making the `RemainingTime` null. To ensure the two increments don't share the same timestamp, we sleep for one millisecond.
Although I have only observed this issue on .NET Framework it would be possible that it occasionally also occur on .NET Core.
On .NET Framework, `exception.ToString()` uses a slightly different format than on .NET Core.
So in order to properly transform an `Exception` into an `ExceptionInfo` on both .NET Core and .NET Framework we use `exception.StackTrace` + `exception.InnerException`. As an added benefit, it greatly simplifies the implementation of the `ExceptionParser` class.