Overview
This page provides a comprehensive table of all available Stackworx analyzers and their rules. Click on any rule to view detailed documentation.
All Rules
| Rule ID | Title | Category | Severity | Summary |
|---|---|---|---|---|
| SW001 | Avoid implicit DateTime → DateTimeOffset conversion | Usage | Warning | Flags implicit conversions from DateTime to DateTimeOffset, requiring explicit construction. |
| SW002 | Method appears unused | Usage | Warning (disabled by default) | Flags source-declared methods that have no references in the current compilation (ignores JetBrains [PublicAPI]/[UsedImplicitly]). |
| SWGQL01 | Field extension methods on non-static classes must be instance methods | GraphQL | Error | Validates that static field extension methods are only used in static classes. |
| SWGQL02 | DataLoader interface appears unused | GraphQL | Info | Detects DataLoader interfaces that aren't referenced in the compilation. |
| SWGQL03 | Class with [ExtendObjectType] must be static | GraphQL | Error | Enforces that classes annotated with [ExtendObjectType] are declared as static. |
| SWGQL04 | Duplicate GraphQL extension field | GraphQL | Error | Detects duplicate GraphQL field resolvers across [ExtendObjectType<T>] extension classes for the same type. |
| SWGQL05 | HotChocolate GraphQL type should be marked as [UsedImplicitly] | GraphQL | Warning | GraphQL types are often discovered via reflection; requires [UsedImplicitly] on HotChocolate schema types. |
| SWGQL06 | [UsedImplicitly] applied to non-GraphQL type | GraphQL | Warning | Flags [UsedImplicitly] on types that don't look like HotChocolate GraphQL schema types. |
| SW101 | Forbidden reference to feature-internal namespace | Architecture | Warning | Prevents references to feature-internal namespaces from outside the feature. |
| SW102 | Forbidden using to feature-internal namespace | Architecture | Warning | Prevents using directives that import feature-internal namespaces from outside. |
Rules by Category
GraphQL Rules
- SWGQL01 - Field extension methods on non-static classes must be instance methods
- SWGQL02 - DataLoader interface appears unused
- SWGQL03 - Class with [ExtendObjectType] must be static
- SWGQL04 - Duplicate GraphQL extension field
- SWGQL05 / SWGQL06 - HotChocolate GraphQL types and [UsedImplicitly]