File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
docs/content/how-tos/rules
tests/FSharpLint.Core.Tests/Rules/Conventions Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ hide_menu: true
66
77# FavourStaticEmptyFields (FL0076)
88
9- * Introduced in ` 0.21.1 ` *
9+ * Introduced in ` 0.21.3 ` *
1010
1111## Cause
1212
@@ -18,10 +18,10 @@ Using static empty fields aids readibility.
1818
1919## How To Fix
2020
21- Use a static empty field such as String.Empty, List.Empty or Array.Empty .
21+ Use a static empty field such as String.Empty, List.Empty or Array.empty .
2222
2323## Rule Settings
2424
2525 {
2626 "favourStaticEmptyFields": { "enabled": false }
27- }
27+ }
Original file line number Diff line number Diff line change 339339 <data name =" RulesFavourStaticEmptyFieldsForString" xml : space =" preserve" >
340340 <value >Consider using 'String.Empty' instead.</value >
341341 </data >
342- <data name =" RulesFavourStaticEmptyFieldsForArray" xml : space =" preserve" >
343- <value >Consider using 'Array.Empty' instead.</value >
344- </data >
345342 <data name =" RulesFavourStaticEmptyFieldsForList" xml : space =" preserve" >
346343 <value >Consider using 'List.Empty' instead.</value >
347344 </data >
345+ <data name =" RulesFavourStaticEmptyFieldsForArray" xml : space =" preserve" >
346+ <value >Consider using 'Array.empty' instead.</value >
347+ </data >
348348</root >
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ let foo a =
9393
9494 [<Test>]
9595 member this.FavourStaticEmptyFieldsShouldNotProduceError_5 () =
96- this.Parse " System.Console.WriteLine List.Empty.Length"
96+ this.Parse " System.Console.WriteLine( List.Empty.Length.ToString()) "
9797
9898 Assert.IsTrue this.NoErrorsExist
9999
@@ -105,7 +105,7 @@ let foo a =
105105
106106 [<Test>]
107107 member this.FavourStaticEmptyFieldsShouldNotProduceError_7 () =
108- this.Parse " System.Console.WriteLine Array.Empty .Length"
108+ this.Parse " System.Console.WriteLine( Array.empty .Length.ToString()) "
109109
110110 Assert.IsTrue this.NoErrorsExist
111111
You can’t perform that action at this time.
0 commit comments