Skip to content

Commit 56db418

Browse files
committed
test: more Lint call properties
1 parent b896006 commit 56db418

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/FSharpLint.Client.Tests/TestClient.fs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,21 @@ let ``Daemon can lint a file with success``() =
116116
| Content result -> Assert.Fail("Should be a lint result")
117117
| LintResult warnings ->
118118
Assert.IsNotEmpty warnings
119+
120+
warnings
121+
|> List.iter(fun warning ->
122+
Assert.IsNotEmpty warning.RuleName
123+
Assert.IsTrue (warning.RuleIdentifier.StartsWith("FL"))
124+
Assert.IsNotEmpty warning.ErrorText
125+
Assert.IsNotEmpty warning.FilePath
126+
127+
Assert.IsNotEmpty warning.Details.Message
128+
Assert.Positive warning.Details.Range.StartLine
129+
Assert.Positive warning.Details.Range.StartColumn
130+
Assert.Positive warning.Details.Range.EndLine
131+
Assert.Positive warning.Details.Range.EndColumn
132+
Assert.IsTrue <| Option.isSome warning.Details.SuggestedFix)
133+
119134
Assert.AreEqual(LanguagePrimitives.EnumToValue FSharpLintResponseCode.OkLint, versionResponse.Code)
120135

121136
[<Test; Ignore("not sure how to make file parsing fail")>]

0 commit comments

Comments
 (0)