Skip to content
New issue

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

Don't break namespaces unnecessarily #2279

Closed
Thorium opened this issue May 25, 2022 · 2 comments
Closed

Don't break namespaces unnecessarily #2279

Thorium opened this issue May 25, 2022 · 2 comments

Comments

@Thorium
Copy link
Member

Thorium commented May 25, 2022

Looking at the (silly example) code here:

let generateSillyPwd() =
    System.Web.Security.Membership.GeneratePassword(9, 0)
        .Replace("a","b")
        .Replace("c","d")
        .Replace("e","f")
        .Replace("g","h")

The max-length would allow this code.
Default setting Fantomas still breaks the namespaces, hiding the method call "GeneratePassword" with the intention of post-processing:

let generateSillyPwd() =
    System
        .Web
        .Security
        .Membership
        .GeneratePassword(9, 0)
        .Replace("a", "b")
        .Replace("c", "d")
        .Replace("e", "f")
        .Replace("g", "h")

When I read the code above, my focus is that "oh, this is System: That is important".

@nojaf
Copy link
Contributor

nojaf commented May 25, 2022

Hello, please raise this over at the style guide.
We have something in place today but tries to respect the max_line_length but it doesn't always hit the mark. This conversation should be happening over at https://github.com/fsharp/fslang-design#style-guide

@dsyme
Copy link
Contributor

dsyme commented May 26, 2022

I commented on the "Don't break namespaces unnecessarily" here fsharp/fslang-design#664 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants