Roald87 / TcBlack

Opnionated code formatter for TwinCAT.
MIT License
105 stars 10 forks source link

Add auto formatter for C# code #90

Closed rruiter87 closed 1 year ago

rruiter87 commented 2 years ago

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
Barteling commented 2 years ago

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

rruiter87 commented 2 years ago

@Barteling 😅

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