-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Matching Input and Output Type Activity Analyzer (#316)
This new analyzer will search for `TaskOrchestrationContext.CallActivityAsync` invocations and check if the provided input and output types matches the related Activity definition. The activity can be either an Azure Function activity, a Durable Task Activity or a Durable Task Func/Action. If there is a mismatch between the types, the analyzer reports `DURABLE2001` (input mismatch) or `DURABLE2002` (output mismatch). The code uses activity name to correlate the invocations and their definitions, which must be constant in compile time. For instance, they can be defined using `nameof` operator, string `const` fields or locals, and string literals. If the invocation name can't be determined (because it is not constant a compile time), the code ignores the checking to avoid a false positive report.
- Loading branch information
1 parent
23eb257
commit cd92074
Showing
8 changed files
with
826 additions
and
1 deletion.
There are no files selected for viewing
352 changes: 352 additions & 0 deletions
352
src/Analyzers/Activities/MatchingInputOutputTypeActivityAnalyzer.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.