We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue created from fantomas-online
// This file is automatically generated by FAKE // This file is needed for IDE support only #if !FAKE #load "intellisense_lazy.fsx" #endif
System.ArgumentException: The input sequence was empty. (Parameter 'list') at Fantomas.Trivia.findLastNode(FSharpList`1 nodes) in /home/runner/work/fantomas-tools/fantomas-tools/.deps/fantomas/src/Fantomas/Trivia.fs:line 61 at Fantomas.Trivia.addTriviaToTriviaNode(FSharpFunc`2 triviaBetweenAttributeAndParentBinding, Boolean hasAnonModulesAndOpenStatements, Int32 startOfSourceCode, FSharpList`1 triviaNodes, Trivia trivia) in /home/runner/work/fantomas-tools/fantomas-tools/.deps/fantomas/src/Fantomas/Trivia.fs:line 381 at Fantomas.Trivia.collectTrivia@422-1.Invoke(FSharpList`1 triviaNodes, Trivia trivia) in /home/runner/work/fantomas-tools/fantomas-tools/.deps/fantomas/src/Fantomas/Trivia.fs:line 414 at Microsoft.FSharp.Collections.ListModule.Fold[T,TState](FSharpFunc`2 folder, TState state, FSharpList`1 list) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\list.fs:line 222 at Fantomas.Trivia.collectTrivia(FSharpList`1 tokens, Int32 lineCount, ParsedInput ast) at Fantomas.Context.Context.Create(FormatConfig config, FSharpList`1 defines, String content, FSharpOption`1 maybeAst) at Fantomas.CodeFormatterImpl.formatWith(ParsedInput ast, FSharpList`1 defines, FormatContext formatContext, FormatConfig config) in /home/runner/work/fantomas-tools/fantomas-tools/.deps/fantomas/src/Fantomas/CodeFormatterImpl.fs:line 395 at Fantomas.CodeFormatterImpl.format@412-1.Invoke(Tuple`2[] _arg1) in /home/runner/work/fantomas-tools/fantomas-tools/.deps/fantomas/src/Fantomas/CodeFormatterImpl.fs:line 414 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 416 at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 109
Bug in Trivia.fs
let private findLastNode (nodes: TriviaNodeAssigner list) : TriviaNodeAssigner option = match nodes with | [] -> None | nodes -> nodes |> List.filter isMainNodeButNotAnonModule |> List.maxBy (fun tn -> tn.Range.EndLine) |> Some
where there is only one trivia node.
Fantomas Master at 08/27/2020 15:33:58 - 5d3a411
Default Fantomas configuration
The text was updated successfully, but these errors were encountered:
Add all trivia as content after an empty anon module. Fixes fsproject…
f98dea8
…s#1031
Successfully merging a pull request may close this issue.
Issue created from fantomas-online
Code
Error
Problem description
Bug in Trivia.fs
where there is only one trivia node.
Extra information
Options
Fantomas Master at 08/27/2020 15:33:58 - 5d3a411
Default Fantomas configuration
The text was updated successfully, but these errors were encountered: