Skip to content

Latest commit

 

History

History
86 lines (70 loc) · 2.35 KB

File metadata and controls

86 lines (70 loc) · 2.35 KB

Fork of the CSharpier project with the K&R Style (opening brace on the same line, rather than on the next line).

Quick Start

Unfortunately you'll have to compile this by yourself. With dotnet SDK set up, it shouldn't be too hard.

dotnet pack ./Src/CSharpier.Cli/CSharpier.Cli.csproj -c Release -o dist

Your binaries should be available in Src/CSharpier.Cli/bin/Release/net8.0 (and net9.0)

Running CSharpier.exe format . formats a whole dir.

VSCode (format on save)

After compiling your own binary, install the vehmloewff.custom-format extension (which allows you to run any command to format code)

    "custom-format.formatters": [
        {
            "language": "csharp",
            "command": "path/to/CSharpier.exe format"
        },
    ],
    "[csharp]": {
        "editor.rulers": [ 100 ],
        "editor.formatOnSave": true,
        "editor.defaultFormatter": "Vehmloewff.custom-format",
    },

Before

public class ClassName {
    public void CallMethod() { 
        this.LongUglyMethod("1234567890", "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
    }
}

After (this fork)

public class ClassName {
    public void CallMethod() {
        this.LongUglyMethod(
            "1234567890",
            "abcdefghijklmnopqrstuvwxyz",
            "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
        );
    }
}

After (original CSharpier)

public class ClassName
{
    public void CallMethod()
    {
        this.LongUglyMethod(
            "1234567890",
            "abcdefghijklmnopqrstuvwxyz",
            "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
        );
    }
}

Contributing

See Development Readme

Join Us Discord

Sponsors

Thanks to the following companies for sponsoring the ongoing development of CSharpier.

.NET on AWS Open Source Software Fund

Fern

And a huge thanks to all the others who sponsor the project through Github sponsors