fantomas
fantomas copied to clipboard
Respect page width in pattern match
Issue created from fantomas-online
Code
match ast with
| Some(ParsedInput.ImplFile(ParsedImplFileInput(modules =[
SynModuleOrNamespace.SynModuleOrNamespace(decls = [
SynModuleDecl.Let(bindings = [
SynBinding.Binding( expr = SynExpr.Do(_, keywordRange, _))
])
])
]))) ->
Assert.AreEqual(expectedRangeStart, keywordRange.Start) |> ignore
Assert.AreEqual(expectedRangEnd, keywordRange.End) |> ignore
| _ ->
failwith "Could not find SynExpr.Do"
Result
match ast with
| Some (ParsedInput.ImplFile (ParsedImplFileInput(modules = [ SynModuleOrNamespace.SynModuleOrNamespace(decls = [ SynModuleDecl.Let(bindings = [ SynBinding.Binding(expr = SynExpr.Do (_,
keywordRange,
_)) ]) ]) ]))) ->
Assert.AreEqual(expectedRangeStart, keywordRange.Start)
|> ignore
Assert.AreEqual(expectedRangEnd, keywordRange.End)
|> ignore
| _ -> failwith "Could not find SynExpr.Do"
Problem description
Please describe here the Fantomas problem you encountered. Check out our Contribution Guidelines.
Extra information
- [ ] The formatted result breaks by code.
- [ ] The formatted result gives compiler warnings.
- [ ] I or my company would be willing to help fix this.
Options
Fantomas Master at 01/05/2021 21:00:18 - d5f4d9f52d55a9ad54b964195fff1c0a028a06b9
Default Fantomas configuration
Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?