Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

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 @@ -69,7 +69,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