Skip to content

Commit 94bb624

Browse files
committed
Update SupportsDeferredBinding diagnostic code & update docs (#1377)
1 parent 4e8b57a commit 94bb624

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

docs/analyzer-rules/AZFW0009.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# AZFW0009: Invalid use of SupportsDeferredBinding attribute
2+
3+
| | Value |
4+
|-|-|
5+
| **Rule ID** |AZFW0009|
6+
| **Category** |[Usage]|
7+
| **Severity** |Error|
8+
9+
## Cause
10+
11+
This rule is triggered when the `SupportsDeferredBinding` attribute is used on any class other
12+
than an input (`InputBindingAttribute`) or trigger (`TriggerBindingAttribute`) binding based class.
13+
14+
## Rule description
15+
16+
The `SupportsDeferredBinding` attribute is used to determine if a binding supports deferred binding.
17+
Currently, this feature is only supported for input and trigger bindings. Output bindings are not supported
18+
and this attribute should not be used on any other class type.
19+
20+
## How to fix violations
21+
22+
Remove the use of the `SupportsDeferredBinding` attribute from your class.
23+
24+
## When to suppress warnings
25+
26+
This rule should not be suppressed because this error may prevent your Azure Functions from running.

sdk/Sdk.Analyzers/DiagnosticDescriptors.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ private static DiagnosticDescriptor Create(string id, string title,string messag
2222
category: Constants.DiagnosticsCategories.Usage, severity: DiagnosticSeverity.Error);
2323

2424
public static DiagnosticDescriptor DeferredBindingAttributeNotSupported{ get; }
25-
= Create(id: "AZFW0003", title: "Invalid class attribute", messageFormat: "The attribute '{0}' can only be used on trigger and input binding attributes.",
25+
= Create(id: "AZFW0009", title: "Invalid class attribute", messageFormat: "The attribute '{0}' can only be used on trigger and input binding attributes.",
2626
category: Constants.DiagnosticsCategories.Usage, severity: DiagnosticSeverity.Error);
2727

2828
}

0 commit comments

Comments
 (0)