Commit 4a8b1bb
Enforce MSTEST0037 and configure test parallelization (#370)
MSTest analyzer warnings were suppressed instead of being properly
addressed.
## Changes
- **MSTEST0037**: Changed `Assert.AreEqual(true, ...)` to
`Assert.IsTrue(...)` in `UnusedLocalVariableTests.cs`. Updated
`.editorconfig` severity from `suggestion` to `warning`.
- **MSTEST0001**: Added assembly-level parallelization configuration:
- `IntelliTect.Analyzer.Test`: `[assembly: Parallelize(Scope =
ExecutionScope.MethodLevel)]`
- `IntelliTect.Analyzer.Integration.Tests`: `[assembly:
DoNotParallelize]`
Removed suppression from `.editorconfig`.
## Example
Before:
```csharp
Assert.AreEqual(true, diagnostic.IsEnabledByDefault);
```
After:
```csharp
Assert.IsTrue(diagnostic.IsEnabledByDefault);
```
> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses (expand for details)</summary>
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> - `pe3vsblobprodcus354.vsblob.vsassets.io`
> - Triggering command:
`/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/.dotnet/dotnet
/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/.dotnet/dotnet
restore --no-dependencies
/home/REDACTED/work/CodingGuidelines/CodingGuidelines/Tools/XMLtoMD/GuidelineXmlToMD.sln
--packages
/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/packages
/p:DisableImplicitNuGetFallbackFolder=true --verbosity normal
/p:TargetFrameworkRootPath=/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot
/p:NetCoreTargetingPackRoot=/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot
/p:AllowMissingPrunePackageData=true` (dns block)
> - Triggering command:
`/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/.dotnet/dotnet
/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/.dotnet/dotnet
restore --no-dependencies
/home/REDACTED/work/CodingGuidelines/CodingGuidelines/Tools/XMLtoMD/GuidelineXmlToMD/GuidelineXmlToMD.csproj
--packages
/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/packages
/p:DisableImplicitNuGetFallbackFolder=true --verbosity normal
/p:TargetFrameworkRootPath=/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot
/p:NetCoreTargetingPackRoot=/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot
/p:AllowMissingPrunePackageData=true` (dns block)
> - Triggering command:
`/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/.dotnet/dotnet
/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/.dotnet/dotnet
restore --no-dependencies
/home/REDACTED/work/CodingGuidelines/CodingGuidelines/Tools/XMLtoMD/GuidelineXmlToMD.Test/GuidelineXmlToMD.Test.csproj
--packages
/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/packages
/p:DisableImplicitNuGetFallbackFolder=true --verbosity normal
/p:TargetFrameworkRootPath=/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot
/p:NetCoreTargetingPackRoot=/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot
/p:AllowMissingPrunePackageData=true` (dns block)
> - `s8mvsblobprodcus38.vsblob.vsassets.io`
> - Triggering command:
`/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/.dotnet/dotnet
/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/.dotnet/dotnet
restore --no-dependencies
/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/152969D1C94CACFB2DD8DDFC3D3B91A8/missingpackages_workingdir
--packages
/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/missingpackages
/p:DisableImplicitNuGetFallbackFolder=true --verbosity normal
--configfile
/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/nugetconfig/nuget.config
--force` (dns block)
>
> If you need me to access, download, or install something from one of
these locations, you can either:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this
repository's [Copilot coding agent
settings](https://github.com/IntelliTect/CodingGuidelines/settings/copilot/coding_agent)
(admins only)
>
> </details>
<!-- START COPILOT CODING AGENT SUFFIX -->
<!-- START COPILOT ORIGINAL PROMPT -->
<details>
<summary>Original prompt</summary>
> Update us to .net 10 and C# 14 on our test projects (our analyzers of
course need to be netstandard)
(https://github.com/IntelliTect/CodingGuidelines/actions/runs/21610710663/job/62278573941)
>
> Understand
https://github.com/dotnet/roslyn/blob/main/docs/wiki/How-To-Write-a-C%23-Analyzer-and-Code-Fix.md
>
>
https://github.com/dotnet/roslyn/blob/main/docs/wiki/Getting-Started-Writing-a-Custom-Analyzer-%26-Code-Fix.md
>
> look for any other microsoft learn documentation
</details>
<!-- START COPILOT CODING AGENT TIPS -->
---
💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
Co-authored-by: Benjamin Michaelis <git@relay.benjamin.michaelis.net>1 parent 9055df1 commit 4a8b1bb
File tree
11 files changed
+32
-18
lines changed- IntelliTect.Analyzer
- IntelliTect.Analyzer.Integration.Tests
- IntelliTect.Analyzer.Test
- Tools/XMLtoMD
- GuidelineXmlToMD.Test
- GuidelineXmlToMD
11 files changed
+32
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
0 commit comments