TcBlack icon indicating copy to clipboard operation
TcBlack copied to clipboard

Add auto formatter for C# code

Open rruiter87 opened this issue 2 years ago • 2 comments

https://github.com/belav/csharpier

  1. install CSharpier

    • dotnet tool install csharpier -g
  2. Add to pre-commit-config.yaml

      - repo: local
        hooks:
          - id: CSharpier
            name: Format C# files
            entry: dotnet csharpier
            language: system
            files: '.*\.(cs$)'
    
  3. run pre-commit run --all-files once

rruiter87 avatar Sep 01 '22 12:09 rruiter87

If you want this feature for STweep you posted this in the wrong repo ^^ image

Barteling avatar Sep 01 '22 14:09 Barteling

@Barteling 😅

copied the pre-commit from STweep and forgot to change it :p

rruiter87 avatar Sep 01 '22 14:09 rruiter87