Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions docs/analyzer-rules/AZFW0009.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# AZFW0009: Invalid use of SupportsDeferredBinding attribute

| | Value |
|-|-|
| **Rule ID** |AZFW0009|
| **Category** |[Usage]|
| **Severity** |Error|

## Cause

This rule is triggered when the `SupportsDeferredBinding` attribute is used on any class other
than an input (`InputBindingAttribute`) or trigger (`TriggerBindingAttribute`) binding based class.

## Rule description

The `SupportsDeferredBinding` attribute is used to determine if a binding supports deferred binding.
Currently, this feature is only supported for input and trigger bindings. Output bindings are not supported
and this attribute should not be used on any other class type.

## How to fix violations

Remove the use of the `SupportsDeferredBinding` attribute from your class.

## When to suppress warnings

This rule should not be suppressed because this error may prevent your Azure Functions from running.
2 changes: 1 addition & 1 deletion sdk/Sdk.Analyzers/DiagnosticDescriptors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ private static DiagnosticDescriptor Create(string id, string title,string messag
category: Constants.DiagnosticsCategories.Usage, severity: DiagnosticSeverity.Error);

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

}
Expand Down