Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd1d9bab

Browse files
vasily-kirichenkoKevinRansom
authored andcommitted
add DiagnosticCustomTags.Unnecessary for 1182 (unused var) warning (dotnet#2225)
1 parent7ff8941 commitd1d9bab

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎vsintegration/src/FSharp.Editor/Common/CommonRoslynHelpers.fs‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ open System.Collections.Generic
88
openSystem.Threading.Tasks
99
openMicrosoft.CodeAnalysis
1010
openMicrosoft.CodeAnalysis.Text
11+
openMicrosoft.CodeAnalysis.Diagnostics
1112
openMicrosoft.FSharp.Compiler
1213
openMicrosoft.FSharp.Compiler.Layout
1314
openMicrosoft.FSharp.Compiler.SourceCodeServices
@@ -98,7 +99,11 @@ module internal CommonRoslynHelpers =
9899
letemptyString= LocalizableString.op_Implicit("")
99100
letdescription= LocalizableString.op_Implicit(error.Message)
100101
letseverity=if error.Severity= FSharpErrorSeverity.Errorthen DiagnosticSeverity.Errorelse DiagnosticSeverity.Warning
101-
letdescriptor=new DiagnosticDescriptor(id, emptyString, description, error.Subcategory, severity,true, emptyString, String.Empty,null)
102+
letcustomTags=
103+
match error.ErrorNumberwith
104+
|1182-> DiagnosticCustomTags.Unnecessary
105+
|_->null
106+
letdescriptor=new DiagnosticDescriptor(id, emptyString, description, error.Subcategory, severity,true, emptyString, String.Empty, customTags)
102107
Diagnostic.Create(descriptor, location)
103108

104109
letFSharpGlyphToRoslynGlyph=function

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp