Skip to content

Commit

Permalink
Remove unused ProjectDiagnosticAnalyzer (#8304)
Browse files Browse the repository at this point in the history
* Remove unused ProjectDiagnosticAnalyzer

* Update proj file
  • Loading branch information
tmat authored and KevinRansom committed Jan 23, 2020
1 parent ba87a35 commit 70883fb
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 90 deletions.

This file was deleted.

1 change: 0 additions & 1 deletion vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
<Compile Include="Debugging\BreakpointResolutionService.fs" />
<Compile Include="Debugging\LanguageDebugInfoService.fs" />
<Compile Include="Diagnostics\DocumentDiagnosticAnalyzer.fs" />
<Compile Include="Diagnostics\ProjectDiagnosticAnalyzer.fs" />
<Compile Include="Diagnostics\SimplifyNameDiagnosticAnalyzer.fs" />
<Compile Include="Diagnostics\UnusedDeclarationsAnalyzer.fs" />
<Compile Include="Diagnostics\UnusedOpensDiagnosticAnalyzer.fs" />
Expand Down
31 changes: 0 additions & 31 deletions vsintegration/tests/UnitTests/ProjectDiagnosticAnalyzerTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -32,34 +32,3 @@ type ProjectDiagnosticAnalyzerTests() =

let args = mkProjectCommandLineArgs (dllName, [fileName])
checker.GetProjectOptionsFromCommandLineArgs (projectName, args)

#if PROJECT_ANALYSIS
[<Test>]
member public this.ProjectDiagnosticsDontReportJustProjectErrors_Bug1596() =
// https://github.com/Microsoft/visualfsharp/issues/1596
let fileContents = """
let x = 3
printf "%d" x
"""
let options = CreateProjectAndGetOptions(fileContents)
let additionalOptions = {options with OtherOptions = Array.append options.OtherOptions [| "--times" |]}

let errors = FSharpProjectDiagnosticAnalyzer.GetDiagnostics(additionalOptions) |> Async.RunSynchronously
Assert.AreEqual(1, errors.Length, "Exactly one warning should have been reported")

let warning = errors.[0]
Assert.AreEqual(DiagnosticSeverity.Warning, warning.Severity, "Diagnostic severity should be a warning")
Assert.AreEqual("The command-line option 'times' is for test purposes only", warning.GetMessage())

[<Test>]
member public this.ProjectDiagnosticsShouldNotReportDocumentErrors_Bug1596() =
// https://github.com/Microsoft/visualfsharp/issues/1596
let fileContents = """
let x = "string value that cannot be printed with %d"
printf "%d" x
"""
let options = CreateProjectAndGetOptions(fileContents)

let errors = FSharpProjectDiagnosticAnalyzer.GetDiagnostics(options) |> Async.RunSynchronously
Assert.AreEqual(0, errors.Length, "No semantic errors should have been reported")
#endif

0 comments on commit 70883fb

Please sign in to comment.