Skip to content

Commit 44c5bc7

Browse files
Ensure that error codes being suppressed are always prefixed with 'CS'
1 parent 35951d0 commit 44c5bc7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/OmniSharp.MSBuild/MSBuildProjectSystem.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ private static CSharpCompilationOptions CreateCompilationOptions(ProjectFileInfo
215215

216216
var specificDiagnosticOptions = new Dictionary<string, ReportDiagnostic>(projectFileInfo.SuppressedDiagnosticIds.Count);
217217

218-
// Always suppress 1701 (Assuming assembly reference 'x' used by 'y' matches identity 'z'. you may need to supply runtime policy)
219-
specificDiagnosticOptions.Add("1701", ReportDiagnostic.Suppress);
218+
// Always suppress CS1701 (Assuming assembly reference 'x' used by 'y' matches identity 'z'. you may need to supply runtime policy)
219+
specificDiagnosticOptions.Add("CS1701", ReportDiagnostic.Suppress);
220220

221221
if (projectFileInfo.SuppressedDiagnosticIds.Any())
222222
{

src/OmniSharp.MSBuild/ProjectFile/PropertyConverter.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public static IList<string> ToSuppressDiagnostics(string propertyValue)
9494
ushort number;
9595
if (ushort.TryParse(id, NumberStyles.Integer, CultureInfo.InvariantCulture, out number))
9696
{
97-
result.Add(id);
97+
result.Add("CS" + number.ToString("0000"));
9898
}
9999
}
100100

0 commit comments

Comments
 (0)