We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ae7c7b commit af741a1Copy full SHA for af741a1
tests/FSharpLint.Core.Tests/Rules/Conventions/FavourStaticEmptyFields.fs
@@ -77,6 +77,20 @@ let foo a =
77
Assert.IsTrue this.ErrorsExist
78
Assert.IsTrue (this.ErrorMsg.Contains "Array.empty")
79
80
+ [<Test>]
81
+ member this.FavourStaticEmptyFieldsShouldProduceError10() =
82
+ this.Parse """
83
+type Person =
84
+ {
85
+ FirstName: string
86
+ Nicknames: List<string>
87
+ }
88
+
89
+{ FirstName = "Foo"; Nicknames = [] } |> ignore"""
90
91
+ Assert.IsTrue this.ErrorsExist
92
+ Assert.IsTrue (this.ErrorMsg.Contains "List.Empty")
93
94
[<Test>]
95
member this.FavourStaticEmptyFieldsShouldNotProduceError1() =
96
this.Parse "let bar = String.Empty"
0 commit comments