WebDriverBiDi.Analyzers
0.0.63
dotnet add package WebDriverBiDi.Analyzers --version 0.0.63
NuGet\Install-Package WebDriverBiDi.Analyzers -Version 0.0.63
<PackageReference Include="WebDriverBiDi.Analyzers" Version="0.0.63"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="WebDriverBiDi.Analyzers" Version="0.0.63" />
<PackageReference Include="WebDriverBiDi.Analyzers"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add WebDriverBiDi.Analyzers --version 0.0.63
#r "nuget: WebDriverBiDi.Analyzers, 0.0.63"
#:package WebDriverBiDi.Analyzers@0.0.63
#addin nuget:?package=WebDriverBiDi.Analyzers&version=0.0.63
#tool nuget:?package=WebDriverBiDi.Analyzers&version=0.0.63
WebDriverBiDi.Analyzers
Roslyn analyzers for WebDriverBiDi.NET that catch common misuse of the library at compile time, rather than as a hang, a deadlock or a protocol error at run time.
Installation
dotnet add package WebDriverBiDi.Analyzers
The package is a development dependency: it contributes no assembly to your output and flows to consumers of your own package only if you ask it to.
What it checks
Thirty-six rules, in four groups:
- Lifecycle (Error). Registering modules, events or type-info resolvers after
StartAsync(); executing a command beforeStartAsync()or afterStopAsync(); using a driver afterDisposeAsync(); callingStartAsync()twice; a fire-and-forget module command; reading captured tasks that were never captured; a mismatchedExecuteCommandAsync<T>result type; registering a custom event under a built-in event name; askingToEventArgs<T>()for a type other than the event's own; an extension-data entry named for a property its object already sends; using an observer's task-capture members, or reading a data collector's events, after it has been disposed. - Event handling (Warning). Adding an observer for an event that was never subscribed; leaking an
EventObserver; blocking calls and deadlock-prone synchronization inside a handler; issuing a module command from a handler that runs on the dispatching thread; anasync voidhandler; opening a capture session that is never read; starting a capture session while one is already active; observingConnection.OnDataReceivedon a connection that aTransportowns. - Correctness (Warning). Unsafe casts of
EvaluateResult; adding to a nullable list without initializing it; mutatingAdditionalData, which is not AOT-safe; a value outside the range the specification defines for a property; registering a library envelope type in a serializer context; a connection string that is not a WebSocket URL for a driver with the default transport; a received type's[JsonPropertyName]property that the serializer cannot set. - Style and cost (Info/Warning). Omitting a
CancellationToken, on any command that accepts one and on the long-running operations in particular; using a parameterless constructor where aReset*property exists; a string literal whereObservableEvent.EventNamewould do; disposing a driver without stopping it first; discarding the observer thatAddObserverreturns.
Most rules ship with a code fix.
Documentation
The analyzer reference documents every rule individually: what it reports, what its code fix does, and — under Known Limitations — the analysis scope each rule works within, which explains why a given rule may not fire in a particular situation.
Configuring severity
Change a rule's severity, or turn it off, from an .editorconfig:
[*.cs]
dotnet_diagnostic.BIDI009.severity = warning
dotnet_diagnostic.BIDI004.severity = none
Single occurrences can be suppressed with #pragma warning disable BIDI0nn or a [SuppressMessage]
attribute.
License
MIT. See the LICENSE file.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.63 | 95 | 10/6/2026 |
| 0.0.62 | 105 | 9/22/2026 |
| 0.0.61 | 99 | 9/15/2026 |
| 0.0.60 | 104 | 9/10/2026 |
| 0.0.59 | 100 | 9/9/2026 |
| 0.0.58 | 105 | 9/9/2026 |
| 0.0.57 | 110 | 9/3/2026 |
| 0.0.56 | 114 | 9/3/2026 |
| 0.0.55 | 149 | 7/7/2026 |
| 0.0.54 | 137 | 5/11/2026 |
| 0.0.53 | 129 | 5/4/2026 |
| 0.0.52 | 119 | 4/30/2026 |
| 0.0.51 | 123 | 4/28/2026 |
| 0.0.50 | 135 | 4/26/2026 |
| 0.0.49 | 150 | 3/29/2026 |
| 0.0.48 | 130 | 3/25/2026 |
| 0.0.47 | 140 | 3/12/2026 |
| 0.0.46 | 139 | 3/8/2026 |