Skip to content

Commit

Permalink
FileConventions: Contains() is not suitable here
Browse files Browse the repository at this point in the history
  • Loading branch information
Mersho committed Aug 17, 2023
1 parent b1cd909 commit 756f364
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/FileConventions/Library.fs
Original file line number Diff line number Diff line change
Expand Up @@ -415,10 +415,10 @@ let DoesNamespaceInclude (fileInfo: FileInfo) (word: string) =

if fileText.Any() then
let rightNamespace =
fileText
|> Seq.tryFind(fun x -> x.Contains "namespace" && x.Contains word)
fileText |> Seq.find(fun x -> x.Contains "namespace")

rightNamespace <> None
rightNamespace.Split().[1].Equals(word)
|| rightNamespace.Split().[1].Equals(word + ";")
else
false

Expand Down

0 comments on commit 756f364

Please sign in to comment.