NickSoftware.Switchboard.Analyzers
0.1.0-preview.56
See the version list below for details.
dotnet add package NickSoftware.Switchboard.Analyzers --version 0.1.0-preview.56
NuGet\Install-Package NickSoftware.Switchboard.Analyzers -Version 0.1.0-preview.56
<PackageReference Include="NickSoftware.Switchboard.Analyzers" Version="0.1.0-preview.56"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="NickSoftware.Switchboard.Analyzers" Version="0.1.0-preview.56" />
<PackageReference Include="NickSoftware.Switchboard.Analyzers"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add NickSoftware.Switchboard.Analyzers --version 0.1.0-preview.56
#r "nuget: NickSoftware.Switchboard.Analyzers, 0.1.0-preview.56"
#:package NickSoftware.Switchboard.Analyzers@0.1.0-preview.56
#addin nuget:?package=NickSoftware.Switchboard.Analyzers&version=0.1.0-preview.56&prerelease
#tool nuget:?package=NickSoftware.Switchboard.Analyzers&version=0.1.0-preview.56&prerelease
Switchboard Analyzers
Roslyn analyzers and code fixes for the Switchboard Amazon Connect framework. Provides compile-time validation to catch errors before deployment.
⚠️ PREVIEW RELEASE: Part of the Switchboard preview release. APIs may change.
Overview
This package provides Roslyn analyzers that validate your Amazon Connect contact flows at compile time, catching common errors before deployment:
- Missing required flow components
- Invalid transitions between actions
- Empty or misconfigured prompts
- Circular references in flow logic
- Duplicate action identifiers
Installation
dotnet add package NickSoftware.Switchboard.Analyzers --prerelease
This package is typically installed alongside the main Switchboard package:
dotnet add package NickSoftware.Switchboard --prerelease
dotnet add package NickSoftware.Switchboard.Analyzers --prerelease
Diagnostics
| Code | Severity | Description |
|---|---|---|
| SWB001 | Error | Flow must have at least one action |
| SWB002 | Warning | Flow should end with a terminal action (Disconnect or TransferToQueue) |
| SWB003 | Error | All transitions must point to valid action identifiers |
| SWB004 | Error | Flow name must be set before building |
| SWB005 | Error | Queue name cannot be empty or whitespace |
| SWB006 | Error | Prompt text is required |
| SWB007 | Error | Lambda function ARN is required |
| SWB008 | Error | Hours of operation name cannot be empty |
| SWB009 | Error | Circular reference detected in flow logic |
| SWB010 | Error | Action identifier must be unique within the flow |
Example
The analyzer catches issues like this at compile time:
// ❌ SWB001: Flow must have at least one action
var flow = new FlowBuilder()
.SetName("EmptyFlow")
.Build();
// ❌ SWB006: Prompt text is required
var flow = new FlowBuilder()
.SetName("InvalidFlow")
.PlayPrompt("") // Empty prompt text
.Build();
// ✅ Valid flow
var flow = new FlowBuilder()
.SetName("ValidFlow")
.PlayPrompt("Welcome to our service")
.TransferToQueue("Support")
.Build();
Code Fixes
The analyzers include automatic code fixes for common issues:
- Add missing terminal actions
- Fix empty prompt text
- Generate unique action identifiers
Configuration
Analyzers can be configured in your .editorconfig:
# Treat SWB002 as an error instead of warning
dotnet_diagnostic.SWB002.severity = error
# Disable SWB010 (duplicate identifier check)
dotnet_diagnostic.SWB010.severity = none
Requirements
- .NET Standard 2.0 compatible
- Works with Visual Studio 2022, VS Code, and JetBrains Rider
Related Packages
- NickSoftware.Switchboard - Core framework
- NickSoftware.Switchboard.SourceGenerators - Code generation
Documentation
Part of the Switchboard framework for Amazon Connect
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.1.0-preview.68 | 26 | 5/5/2026 |
| 0.1.0-preview.62 | 39 | 3/26/2026 |
| 0.1.0-preview.61 | 40 | 3/25/2026 |
| 0.1.0-preview.60 | 36 | 3/20/2026 |
| 0.1.0-preview.59 | 32 | 3/8/2026 |
| 0.1.0-preview.58 | 40 | 3/7/2026 |
| 0.1.0-preview.56 | 41 | 1/25/2026 |
| 0.1.0-preview.55 | 46 | 1/25/2026 |
| 0.1.0-preview.54 | 41 | 1/25/2026 |
| 0.1.0-preview.53 | 41 | 1/25/2026 |
| 0.1.0-preview.52 | 69 | 12/3/2025 |
| 0.1.0-preview.51 | 54 | 12/2/2025 |
| 0.1.0-preview.48 | 61 | 12/2/2025 |
| 0.1.0-preview.47 | 62 | 12/1/2025 |
| 0.1.0-preview.46 | 66 | 12/1/2025 |
| 0.1.0-preview.45 | 71 | 11/30/2025 |
| 0.1.0-preview.44 | 66 | 11/30/2025 |
| 0.1.0-preview.43 | 70 | 11/30/2025 |
| 0.1.0-preview.42 | 66 | 11/30/2025 |
| 0.1.0-preview.41 | 64 | 11/30/2025 |
Preview release - APIs may change. See documentation at https://nicksoftware.github.io/switchboard-docs/