Skip to content

Commit 48fef54

Browse files
Add settings for enabling FSharpLinter integration
1 parent 8b6c7fb commit 48fef54

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

release/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,11 @@
202202
"type": "boolean",
203203
"default": true,
204204
"description": "Includes keywords in autocomplete"
205+
},
206+
"FSharp.linter": {
207+
"type": "boolean",
208+
"default": true,
209+
"description": "Enables integration with FSharpLinter (additional warnigns)"
205210
}
206211
}
207212
}

src/Components/Linter.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ module Linter =
2222
let mutable private currentDiagnostic = languages.createDiagnosticCollection ()
2323

2424
let private mapResult file (ev : LintResult) =
25+
let setting = workspace.getConfiguration().get("FSharp.linter", true)
2526
let res =
26-
if ev |> unbox <> null then
27+
if ev |> unbox <> null && setting then
2728
ev.Data
2829
|> Seq.map (fun d ->
2930
let range = Range(float d.Range.StartLine - 1., float d.Range.StartColumn - 1., float d.Range.EndLine - 1., float d.Range.EndColumn - 1.)

0 commit comments

Comments
 (0)