@@ -12,6 +12,7 @@ open Fsdk
1212let ymlAssertionError = " Bug: file should be a .yml file"
1313let projAssertionError = " Bug: file should be a proj file"
1414let sourceFileAssertionError = " Bug: file was not a F#/C# source file"
15+ let fsxAssertionError = " Bug: file was not a F# script source file"
1516
1617let HasCorrectShebang ( fileInfo : FileInfo ) =
1718 let fileText = File.ReadLines fileInfo.FullName
@@ -88,9 +89,7 @@ let DetectAsteriskInPackageReferenceItems(fileInfo: FileInfo) =
8889 asteriskInPackageReference.IsMatch fileText
8990
9091let DetectMissingVersionsInNugetPackageReferences ( fileInfo : FileInfo ) =
91- Misc.BetterAssert
92- ( fileInfo.FullName.EndsWith " .fsx" )
93- sourceFileAssertionError
92+ Misc.BetterAssert ( fileInfo.FullName.EndsWith " .fsx" ) fsxAssertionError
9493
9594 let fileLines = File.ReadLines fileInfo.FullName
9695
@@ -320,9 +319,7 @@ let DetectInconsistentVersionsInNugetRefsInFSharpScripts
320319 =
321320 fileInfos
322321 |> Seq.iter( fun fileInfo ->
323- Misc.BetterAssert
324- ( fileInfo.FullName.EndsWith " .fsx" )
325- sourceFileAssertionError
322+ Misc.BetterAssert ( fileInfo.FullName.EndsWith " .fsx" ) fsxAssertionError
326323 )
327324
328325 DetectInconsistentVersions
@@ -491,7 +488,7 @@ let ContainsConsoleMethods(fileInfo: FileInfo) =
491488 checkLine fileLines
492489
493490
494- let ReturnAllProjectSourceFile
491+ let ReturnAllProjectSourceFiles
495492 ( parentDir : DirectoryInfo )
496493 ( patterns : List < string >)
497494 ( shouldFilter : bool )
@@ -521,7 +518,7 @@ let NotFollowingConsoleAppConvention (fileInfo: FileInfo) (shouldFilter: bool) =
521518
522519 if not ( fileText.Contains " <OutputType>Exe</OutputType>" ) then
523520 let sourceFiles =
524- ReturnAllProjectSourceFile
521+ ReturnAllProjectSourceFiles
525522 ( DirectoryInfo parentDir)
526523 [ " *.cs" ; " *.fs" ]
527524 shouldFilter
0 commit comments