Skip to content

Commit 3343a9a

Browse files
authored
Merge pull request #1463 from microsoft/dev/andarno/enhance-sample
Apply our analyzers to the samples project
2 parents c2fbe77 + f2bbe66 commit 3343a9a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

samples/ApiSamples.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
public class SuppressRelevanceSample
99
{
10-
private readonly ReentrantSemaphore semaphore = ReentrantSemaphore.Create(mode: ReentrantSemaphore.ReentrancyMode.NotAllowed);
10+
private readonly ReentrantSemaphore semaphore = ReentrantSemaphore.Create(1, null, ReentrantSemaphore.ReentrancyMode.NotAllowed);
1111

1212
#region SuppressRelevance
1313
public async Task DoSomethingAsync()

samples/samples.csproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@
77

88
<ItemGroup>
99
<ProjectReference Include="..\src\Microsoft.VisualStudio.Threading\Microsoft.VisualStudio.Threading.csproj" />
10-
<!-- <ProjectReference Include="$(RepoRootPath)src\Microsoft.VisualStudio.Threading.Analyzers.CodeFixes\Microsoft.VisualStudio.Threading.Analyzers.CodeFixes.csproj">
10+
<ProjectReference Include="$(RepoRootPath)src\Microsoft.VisualStudio.Threading.Analyzers.CodeFixes\Microsoft.VisualStudio.Threading.Analyzers.CodeFixes.csproj">
11+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
12+
<OutputItemType>Analyzer</OutputItemType>
13+
</ProjectReference>
14+
<ProjectReference Include="$(RepoRootPath)src\Microsoft.VisualStudio.Threading.Analyzers\Microsoft.VisualStudio.Threading.Analyzers.csproj">
1115
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
1216
<OutputItemType>Analyzer</OutputItemType>
1317
</ProjectReference>
1418
<ProjectReference Include="$(RepoRootPath)src\Microsoft.VisualStudio.Threading.Analyzers.CSharp\Microsoft.VisualStudio.Threading.Analyzers.CSharp.csproj">
1519
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
1620
<OutputItemType>Analyzer</OutputItemType>
17-
</ProjectReference> -->
21+
</ProjectReference>
1822
</ItemGroup>
1923

2024
</Project>

0 commit comments

Comments
 (0)