Skip to content

Commit aa2c802

Browse files
committed
FavourStaticEmptyFields: apply fix
Fix in FavourStaticEmptyFields rule for empty string of fields in records.
1 parent ade8da0 commit aa2c802

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/FSharpLint.Core/Rules/Conventions/FavourStaticEmptyFields.fs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ let private runner (args: AstNodeRuleParams) =
4848
| Some(SynExpr.ArrayOrList(isArray, [], range)) ->
4949
let emptyLiteralType = if isArray then EmptyArrayLiteral else EmptyListLiteral
5050
generateError range emptyLiteralType
51+
| Some(SynExpr.Const (SynConst.String ("", _, range), _)) ->
52+
generateError range EmptyStringLiteral
5153
| _ -> Array.empty)
5254
|> Array.concat
5355
| _ -> Array.empty

0 commit comments

Comments
 (0)