File tree Expand file tree Collapse file tree 3 files changed +5
-20
lines changed Expand file tree Collapse file tree 3 files changed +5
-20
lines changed Original file line number Diff line number Diff line change
1
+ obj/**/*.fs
2
+ src/Fantomas.FCS/generated
Original file line number Diff line number Diff line change @@ -17,4 +17,4 @@ remote_url="$2"
17
17
18
18
# ensure that formatting is correct before pushing to the remote repository
19
19
dotnet tool restore
20
- dotnet fake build -t CheckFormat
20
+ dotnet fantomas -r src docs/.style/ build.fsx
Original file line number Diff line number Diff line change @@ -16,15 +16,6 @@ let configuration = DotNet.BuildConfiguration.Release
16
16
let solutionFile = " fantomas.sln"
17
17
//// Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
18
18
19
- // Files to format
20
- let sourceFiles =
21
- !! " src/**/*.fs"
22
- ++ " src/**/*.fsi"
23
- ++ " build.fsx"
24
- ++ " docs/**/*.fsx"
25
- -- " src/**/obj/**/*.fs"
26
- -- " src/Fantomas.FCS/generated/netstandard2.0/*.*"
27
-
28
19
// Types and helper functions for building external projects (see the TestExternalProjects target below)
29
20
type ProcessStartInfo =
30
21
{ ProcessName: string
@@ -300,11 +291,7 @@ Target.create "Benchmark" (fun _ ->
300
291
)
301
292
302
293
Target.create " Format" ( fun _ ->
303
- let result =
304
- sourceFiles
305
- |> Seq.map ( sprintf " \" %s \" " )
306
- |> String.concat " "
307
- |> DotNet.exec id " fantomas"
294
+ let result = DotNet.exec id " fantomas" " --recurse src docs/.style/ build.fsx"
308
295
309
296
if not result.OK then
310
297
printfn " Errors while formatting all files: %A " result.Messages)
@@ -330,11 +317,7 @@ Target.create "FormatChanged" (fun _ ->
330
317
331
318
Target.create " CheckFormat" ( fun _ ->
332
319
let result =
333
- sourceFiles
334
- |> Seq.map ( sprintf " \" %s \" " )
335
- |> String.concat " "
336
- |> sprintf " %s --check"
337
- |> DotNet.exec id " fantomas"
320
+ DotNet.exec id " fantomas" " --check --recurse src docs/.style/ build.fsx"
338
321
339
322
if result.ExitCode = 0 then
340
323
Trace.log " No files need formatting"
You can’t perform that action at this time.
0 commit comments