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

Possible indentation change for array initializers #658

Open
belav opened this issue May 4, 2022 · 1 comment
Open

Possible indentation change for array initializers #658

belav opened this issue May 4, 2022 · 1 comment

Comments

@belav
Copy link
Owner

belav commented May 4, 2022

These two indent differently based on the constructor call, maybe they should indent consistently.

        private static HashSet<string> ignoredFileNames = new HashSet<string>(
            StringComparer.OrdinalIgnoreCase
        )
        {
            "antlr.runtime.dll",
            "Antlr3.Runtime.dll",
            "AuthorizeNet.dll"
        };
// vs
        private static HashSet<string> ignoredFileNames =
            new(StringComparer.OrdinalIgnoreCase)
            {
                "antlr.runtime.dll",
                "Antlr3.Runtime.dll",
                "AuthorizeNet.dll",
@commonquail
Copy link

You may want to look at https://github.com/google/google-java-format/wiki/The-Rectangle-Rule. That design principle is a major factor in churn reduction around assignments by google-java-format, and conversely Prettier not using it (and by indirect extension CSharpier) generates churn. See also #765.

@belav belav changed the title Possible indentation change Possible indentation change for array initializers Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants