Родитель
408336d207
Коммит
4dea9f8d2e
|
@ -48,7 +48,7 @@
|
||||||
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
|
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
|
||||||
<Authors>Microsoft</Authors>
|
<Authors>Microsoft</Authors>
|
||||||
<Product>Azure .NET SDK - Tools</Product>
|
<Product>Azure .NET SDK - Tools</Product>
|
||||||
<PackageIconUrl>http://go.microsoft.com/fwlink/?LinkID=288890</PackageIconUrl>
|
<PackageIcon>pkgicon.png</PackageIcon>
|
||||||
<RepositoryUrl>https://github.com/Azure/azure-sdk-tools</RepositoryUrl>
|
<RepositoryUrl>https://github.com/Azure/azure-sdk-tools</RepositoryUrl>
|
||||||
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
|
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
|
||||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||||
|
|
|
@ -18,5 +18,10 @@
|
||||||
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)AzureSDKToolsKey.snk</AssemblyOriginatorKeyFile>
|
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)AzureSDKToolsKey.snk</AssemblyOriginatorKeyFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<!-- Add Package Icon -->
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="$(RepoEngPath)/images/pkgicon.png" Pack="true" PackagePath=""/>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<Import Project="Versioning.targets" />
|
<Import Project="Versioning.targets" />
|
||||||
</Project>
|
</Project>
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 832 B |
|
@ -185,6 +185,30 @@ namespace RandomNamespace
|
||||||
Assert.Empty(diagnostics);
|
Assert.Empty(diagnostics);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task AZC0012NoWarningOnNested()
|
||||||
|
{
|
||||||
|
var testSource = TestSource.Read(@"
|
||||||
|
namespace RandomNamespace
|
||||||
|
{
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
public class MyClass
|
||||||
|
{
|
||||||
|
public static async Task CallFooAsync()
|
||||||
|
{
|
||||||
|
await FooAsync(await (getFoo()).ConfigureAwait(false)).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static async Task FooAsync(bool foo) {}
|
||||||
|
private static async Task<bool> getFoo() => true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
");
|
||||||
|
var diagnostics = await _runner.GetDiagnosticsAsync(testSource.Source);
|
||||||
|
Assert.Empty(diagnostics);
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task AZC0012WarningOnVariable()
|
public async Task AZC0012WarningOnVariable()
|
||||||
{
|
{
|
||||||
|
|
|
@ -104,6 +104,8 @@ namespace Azure.ClientSdk.Analyzers
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ConfigureAwait is either an instance method with one parameter or a static extension method with two.
|
||||||
|
// We need to check if the last argument is a bool and if it is 'true'
|
||||||
var constantValue = operation.Arguments.Last().Value?.ConstantValue;
|
var constantValue = operation.Arguments.Last().Value?.ConstantValue;
|
||||||
if (constantValue != null && constantValue.Value.Value is bool value && value)
|
if (constantValue != null && constantValue.Value.Value is bool value && value)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
<BuildOutputTargetFolder>analyzers/dotnet/cs/</BuildOutputTargetFolder>
|
<BuildOutputTargetFolder>analyzers/dotnet/cs/</BuildOutputTargetFolder>
|
||||||
<VersionPrefix>0.1.1</VersionPrefix>
|
<VersionPrefix>0.1.1</VersionPrefix>
|
||||||
<LangVersion>8</LangVersion>
|
<LangVersion>8</LangVersion>
|
||||||
|
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче