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

Additional Linebreak before using static #1279

Open
samtrion opened this issue Jun 3, 2024 · 3 comments
Open

Additional Linebreak before using static #1279

samtrion opened this issue Jun 3, 2024 · 3 comments

Comments

@samtrion
Copy link
Contributor

samtrion commented Jun 3, 2024

Input:

namespace SomeLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Xml.Linq;
using static System.StringComparison;
public sealed class SomeClass {}

Output:

namespace SomeLibrary;

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Xml.Linq;
using static System.StringComparison;

public sealed class SomeClass { }

Expected behavior:

namespace SomeLibrary;

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Xml.Linq;

using static System.StringComparison;

public sealed class SomeClass { }
@belav
Copy link
Owner

belav commented Jun 3, 2024

CSharpier currently removes all blank lines between usings. See here

I agree that it would be nice to either automatically insert some lines, or retain existing lines. It may be that automatically inserting lines is quite a bit easier than retaining existing lines.

@samtrion
Copy link
Contributor Author

samtrion commented Jun 3, 2024

Inserting is certainly the simpler option. But basically, this would be something that you would also want to control via the .csharpierrc configuration.

@belav
Copy link
Owner

belav commented Jun 3, 2024

this would be something that you would also want to control via the .csharpierrc configuration.

No.

CSharpier provides a few basic options that affect formatting and has no plans to add more. It follows the Option Philosophy of prettier.

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

2 participants