You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Command line bug:
I tried to format Program.fs.
This worked fine with:
❯ dotnet fantomas --config .\fantomas-config.json .\EventSourced\Program.fs
Processing .\EventSourced\Program.fs
.\EventSourced\Program.fs has been written.
but fails with --check.
dotnet fantomas --config .\fantomas-config.json .\EventSourced\Program.fs --check
error: Failed to format .\EventSourced\Program.fs: Fantomas.FormatConfig+FormatException: Parsing failed with errors: [|.\EventSourced\Program.fs (1,1)-(2,1) parse error Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration.|]
And options: { SourceFiles = [|".\EventSourced\Program.fs"|]
ConditionalCompilationDefines = []
ErrorSeverityOptions = { WarnLevel = 3
GlobalWarnAsError = false
WarnOff = []
WarnOn = []
WarnAsError = []
WarnAsWarn = [] }
IsInteractive = false
LightSyntax = None
CompilingFsLib = false
IsExe = false }
at Fantomas.CodeFormatterImpl.parse@61-2.Invoke(FSharpParseFileResults _arg2) in C:\Users\nojaf\Projects\fantomas\src\Fantomas\CodeFormatterImpl.fs:line 66
at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvokeNoHijackCheck[a,b](AsyncActivation`1 ctxt, FSharpFunc`2 userCode, b result1) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 417
at <StartupCode$FSharp-Compiler-Service>.$Service.ParseFile@423-3.Invoke(AsyncActivation`1 ctxt) in C:\projects\fsharp-compiler-service\src\fsharp\service\service.fs:line 423
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 109
.\EventSourced\Program.fs needs formatting
The text was updated successfully, but these errors were encountered:
nojaf
added a commit
to nojaf/fantomas
that referenced
this issue
May 29, 2020
Command line bug:
I tried to format Program.fs.
This worked fine with:
but fails with
--check
.The text was updated successfully, but these errors were encountered: