Skip to content

Commit 56a176e

Browse files
committed
Enforce warning-as-error and fix LSP warning diagnostics
1 parent b001184 commit 56a176e

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
<AssemblyVersion>$(Version)</AssemblyVersion>
1212
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
1313
<ImplicitUsings>enable</ImplicitUsings>
14+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1415
</PropertyGroup>
1516
</Project>

src/FScript.LanguageServer/LspHandlers.fs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,10 +1121,11 @@ module LspHandlers =
11211121
| None -> None
11221122
| Some name ->
11231123
let assembly = typeof<Span>.Assembly
1124-
use stream = assembly.GetManifestResourceStream(name)
1125-
if isNull stream then
1124+
match assembly.GetManifestResourceStream(name) with
1125+
| null ->
11261126
None
1127-
else
1127+
| stream ->
1128+
use stream = stream
11281129
use reader = new StreamReader(stream)
11291130
Some (reader.ReadToEnd())
11301131
with _ ->

src/FScript.LanguageServer/LspSymbols.fs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,8 @@ module LspSymbols =
398398
| None -> ()
399399
| SExpr _ ->
400400
()
401+
| SInclude _ ->
402+
()
401403

402404
result
403405

@@ -432,6 +434,8 @@ module LspSymbols =
432434
| None -> ()
433435
| SExpr _ ->
434436
()
437+
| SInclude _ ->
438+
()
435439

436440
collected.Values |> Seq.toList
437441

0 commit comments

Comments
 (0)