Skip to content

Commit

Permalink
FileConventions: implement the function
Browse files Browse the repository at this point in the history
Implement ProjFilesNamingConvention function.
  • Loading branch information
tehraninasab committed Aug 7, 2023
1 parent 6f0c5ef commit 1e3ca60
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/FileConventions/Library.fs
Original file line number Diff line number Diff line change
Expand Up @@ -389,5 +389,16 @@ let DefiningEmptyStringsWithDoubleQuotes(fileInfo: FileInfo) =
fileText.Contains "\"\""

let ProjFilesNamingConvention(fileInfo: FileInfo) =
printfn "%s" fileInfo.FullName
false
let regex = new Regex("(.*)\..*proj$")
assert (regex.IsMatch fileInfo.FullName)
let fileName = Path.GetFileNameWithoutExtension fileInfo.FullName

let parentDirectoryName =
Path.GetDirectoryName fileInfo.FullName |> Path.GetFileName

printfn
"File name: %s, Parent directory name: %s"
fileName
parentDirectoryName

fileName <> parentDirectoryName

0 comments on commit 1e3ca60

Please sign in to comment.