Skip to content
mnaoumov.dev
Go back

Indent styles holy wars

It is a probably my Baby duck syndrome but I prefer to develop using indents in Allman style. It also sometime called as BSD Style. In ReSharper indent settings it called BSD style

public static void Main()
{
    // Indent with four spaces
}

This style is a default recommended style for C# and that’s why I am using it.

However in JavaScript default recommended style is K&R 1TBS style. In ReSharper indent settings it called K&R style

It also has funny name Egyptian Brackets in a Programming Jargon

image-2022-03-27-21-37-20.png

It seems that default style for css is K&R but I prefer Allman for it.

I could not find any guidelines about PowerShell. It seems that people are using K&R or mixed style.

For now I am using Allman style

Test-Fixture "Test Fixture 1" `
    -TestFixtureSetUp `
    {
        "TestFixtureSetUp"
    } `
    -Tests `
    (
        Test "Test 1" `
        {
            "Test 1"
        }
    ),
    (
        Test "Test 2" `
        {
            "Test 2"
        }
    )

but as you see it heavily uses ` (backtick) symbol.

Don’t know maybe it is ugly?

I am trying to decide maybe it is more natural to use K&R for PowerShell?

What’s your preference?


Share this post on:

Previous Post
WTF Method overloads resolution in PowerShell
Next Post
PoshUnit