File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -666,15 +666,26 @@ let githubRelease _ =
666
666
|> GitHub.publishDraft
667
667
|> Async.RunSynchronously
668
668
669
+ let ignoredFilePredicates = [
670
+ fun ( f : string ) -> f.EndsWith( " AssemblyInfo.fs" )
671
+ fun ( f : string ) -> f.EndsWith( " Generated.fs" )
672
+ ]
673
+
674
+ module Seq =
675
+ let filterOut predicate xs =
676
+ xs |> Seq.filter( predicate >> not )
677
+
678
+ let withoutIgnoredFiles =
679
+ Seq.filterOut( fun f -> ignoredFilePredicates |> Seq.exists ( fun p -> p f))
680
+
669
681
let formatCode _ =
670
682
let result =
671
683
[
672
684
srcCodeGlob
673
685
testsCodeGlob
674
686
]
675
687
|> Seq.collect id
676
- // Ignore AssemblyInfo
677
- |> Seq.filter( fun f -> f.EndsWith( " AssemblyInfo.fs" ) |> not )
688
+ |> withoutIgnoredFiles
678
689
|> String.concat " "
679
690
|> dotnet.fantomas
680
691
@@ -689,8 +700,7 @@ let checkFormatCode _ =
689
700
testsCodeGlob
690
701
]
691
702
|> Seq.collect id
692
- // Ignore AssemblyInfo
693
- |> Seq.filter( fun f -> f.EndsWith( " AssemblyInfo.fs" ) |> not )
703
+ |> withoutIgnoredFiles
694
704
|> String.concat " "
695
705
|> sprintf " %s --check"
696
706
|> dotnet.fantomas
You can’t perform that action at this time.
0 commit comments