Skip to content

Commit 14eb024

Browse files
committed
Remove unused formatting and docs checking build tasks
1 parent bc15f67 commit 14eb024

File tree

2 files changed

+0
-75
lines changed

2 files changed

+0
-75
lines changed

build/Build.fs

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -19,53 +19,6 @@ initializeContext ()
1919
open FSharp.Compiler.Diagnostics
2020
open BasicTasks
2121

22-
let verifyDocs =
23-
BuildTask.create "VerifyDocs" [ clean; build ] {
24-
let targets =
25-
!! "docs/**.fsx" |> Seq.map (fun f -> f.ToString())
26-
27-
let checker =
28-
FSharp.Compiler.CodeAnalysis.FSharpChecker.Create()
29-
30-
let ignoredDiagnostics = Set.ofList [ 1182 ] // unused variable
31-
32-
targets
33-
|> Seq.map (fun target ->
34-
checker.Compile(
35-
[|
36-
"fsc.exe"
37-
"-o"
38-
@"aaaaaaaaaaa.exe"
39-
"-a"
40-
target
41-
|]
42-
)
43-
|> Async.RunSynchronously
44-
|> fst
45-
|> Seq.where (fun diag ->
46-
match diag.Severity with
47-
| FSharpDiagnosticSeverity.Error
48-
| FSharpDiagnosticSeverity.Warning -> true
49-
| _ -> false))
50-
|> Seq.collect id
51-
|> Seq.where (fun c -> not (ignoredDiagnostics.Contains c.ErrorNumber))
52-
|> Seq.sortBy (fun diag ->
53-
(match diag.Severity with
54-
| FSharpDiagnosticSeverity.Error -> 0
55-
| _ -> 1),
56-
diag.FileName.[..6 (* to only count the numeric part *) ])
57-
|> Seq.map (fun diag ->
58-
(match diag.Severity with
59-
| FSharpDiagnosticSeverity.Error -> "--- Error: "
60-
| _ -> "--- Warning: ")
61-
+ diag.ToString())
62-
|> String.concat "\n"
63-
|> (fun errorText ->
64-
match errorText with
65-
| "" -> ()
66-
| text -> raise (System.Exception $"Errors:\n{text}"))
67-
}
68-
6922
let sourceFiles =
7023
!! "src/Plotly.NET/**/*.fs"
7124
++ "src/Plotly.NET.ImageExport/**/*.fs"
@@ -74,33 +27,6 @@ let sourceFiles =
7427
-- "**/obj/**/*.*"
7528
-- "**/bin/**/*.*"
7629

77-
let checkFormat =
78-
BuildTask.create "CheckFormat" [] {
79-
let result =
80-
sourceFiles
81-
|> Seq.map (sprintf "\"%s\"")
82-
|> String.concat " "
83-
|> sprintf "%s --check"
84-
|> DotNet.exec id "fantomas"
85-
86-
if result.ExitCode = 0 then
87-
Trace.log "No files need formatting"
88-
elif result.ExitCode = 99 then
89-
failwith "Some files need formatting, check output for more info"
90-
else
91-
Trace.logf "Errors while formatting: %A" result.Errors
92-
}
93-
94-
let format =
95-
BuildTask.create "Format" [] {
96-
let result =
97-
sourceFiles |> Seq.map (sprintf "\"%s\"") |> String.concat " " |> DotNet.exec id "fantomas"
98-
99-
if not result.OK then
100-
printfn "Errors while formatting all files: %A" result.Messages
101-
}
102-
103-
10430
/// Full release of nuget package, git tag, and documentation for the stable version.
10531
let _release =
10632
BuildTask.createEmpty

build/build.fsproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
<PackageReference Include="Fake.DotNet.MSBuild" Version="5.22.0" />
2828
<PackageReference Include="Fake.IO.FileSystem" Version="5.22.0" />
2929
<PackageReference Include="Fake.Tools.Git" Version="5.22.0" />
30-
<PackageReference Include="FSharp.Compiler.Service" Version="41.0.3" />
3130
</ItemGroup>
3231

3332
</Project>

0 commit comments

Comments
 (0)