Create a Roslyn analyzer for missing properties and other conditions for a better development experience in VS
Currently we provide a warning in the build output for missing properties in the local.settings.json like the one below
warning : Function [Function1]: cannot find value named '' in local.settings.json that matches 'connection' property set on 'blobTrigger'
It would good to have a Roslyn analyzer that would direct towards the same.
Summary
The majority of Functions apps still tend to be C#/.NET applications. As more customers are moving to pre-compiled this would help in the same manner as the Durable Functions Roslyn Analyser.
Suggestions of Items to cover
- Implement the suggestions for HttpClient, DocumentClient etc in https://docs.microsoft.com/en-us/azure/azure-functions/manage-connections
- Suggest not using Async void where possible.
- Suggest using IFunctionsConfigurationBuilder if customers are adding additional files in their startup class. https://docs.microsoft.com/en-us/azure/azure-functions/functions-dotnet-dependency-injection#customizing-configuration-sources
- Analyze existing analyzers and turn them on.
https://www.nuget.org/packages/Microsoft.VisualStudio.Threading.Analyzers/16.9.45-alpha that helps with ASync and Threading
Finbar to create separate work items that are actionable.
@kashimiz FYI
@kashimiz is currently working on this. Leaving in sprint 97 as it is possible we'll have the changes in place before we cut the release.
For awareness. This issue is still very vague and the changes in the linked PRs don't try to address everything outlined here, but this issue will be closed when the PR. If additional work is required once the PR is merged, we need to have the appropriate issues opened.
Moving this to the Epics milestone. The async void analyzer has been merged and is currently on NuGet. SDK updates are pending.