-
-
Notifications
You must be signed in to change notification settings - Fork 204
Description
Fantomas has a number of settings. These can be tweaked, but if they do not conform with a specific formatting wish you are stuck with the setting as it is. Therefore, just having the option to not use that specific setting could help
Pros and Cons
Being able to use Fantomas for use cases where specific settings should not be applied. This would in fact be a bit easier than try to cover all use cases for settings. Also, it matches the ability to exclude specific files.
The disadvantages of making this adjustment to Fantomas are that the ultimate goal of a unified formatting discipline is not reached. Although this is actually not the responsibility of Fantomas
Examples
// Good: simple then case on same line
// more complex else case indented
if b = 0 then []
else
// start a scope block
[
for i in 0..b do
let result = calculate b
if result.IsNone then None
else
result
|> Option.map (fun x -> x / 2)
]
// Fantomas formatted
// used indentation on a very simple scope block
if b = 0 then
[]
else
// start a scope block
[ for i in 0..b do
let result = calculate b
if result.IsNone then
None
else
result |> Option.map (fun x -> x / 2) ]Extra information
Estimated cost (XS, S, M, L, XL, XXL): M
Related suggestions: also related to #1309
Affidavit (please submit!)
Please tick this by placing a cross in the box:
- [x ] I have read the Contribution Guidelines.
- [ x] I have searched both open and closed suggestions on this site and believe this is not a duplicate
Please tick all that apply:
- [ x] This is not a breaking change to Fantomas
- [ x] I or my company would be willing to help implement and/or test this (financial imbursement)
- This suggestion is part of the Microsoft style guide (please add a link to section if so)
- This suggestion is part of the G-Research style guide (please add a link to section if so)