dotnet/codeformatter

Tool that uses Roslyn to automatically rewrite the source to follow our coding styles

C#

1,220

323 commits

updated Jul 11, 2022

See the code

README

CodeFormatter

NOTE: This repo is archived. The replacement is dotnet/format.

CodeFormatter is a tool that uses Roslyn to automatically rewrite the source to follow our coding styles, which are documented here.

Prerequisites

In order to build or run this tool you will need to have Microsoft Build Tools 2015 installed. This comes as a part of Visual Studio 2015.

Installation

Download binaries from GitHub Releases

Usage

In order get the usage, simply invoke the tool with no arguments:

$ .\CodeFormatter.exe
CodeFormatter <project or solution> [<rule types>] [/file:<filename>] [/nocopyright] [/c:<config1,config2> [/copyright:file]
    <rule types> - Rule types to use in addition to the default ones.
                   Use ConvertTests to convert MSTest tests to xUnit.
    <filename>   - Only apply changes to files with specified name.
    <configs>    - Additional preprocessor configurations the formatter
                   should run under.
    <copyright>  - Specifies file containing copyright header.

Contributing

We follow the same contribution process that corefx is using.

dotnet/codeformatter

Tool that uses Roslyn to automatically rewrite the source to follow our coding styles

C#

1,220

323 commits

updated Jul 11, 2022

See the code

README

CodeFormatter

NOTE: This repo is archived. The replacement is dotnet/format.

CodeFormatter is a tool that uses Roslyn to automatically rewrite the source to follow our coding styles, which are documented here.

Prerequisites

In order to build or run this tool you will need to have Microsoft Build Tools 2015 installed. This comes as a part of Visual Studio 2015.

Installation

Download binaries from GitHub Releases

Usage

In order get the usage, simply invoke the tool with no arguments:

$ .\CodeFormatter.exe
CodeFormatter <project or solution> [<rule types>] [/file:<filename>] [/nocopyright] [/c:<config1,config2> [/copyright:file]
    <rule types> - Rule types to use in addition to the default ones.
                   Use ConvertTests to convert MSTest tests to xUnit.
    <filename>   - Only apply changes to files with specified name.
    <configs>    - Additional preprocessor configurations the formatter
                   should run under.
    <copyright>  - Specifies file containing copyright header.

Contributing

We follow the same contribution process that corefx is using.

Project health

Overall

3.9/10

Maintained

0/10

Code review

4/10
OpenSSF Scorecard

Significant stargazers

Dongjoon Hyun

942 followers · starred Mar 2016

Adam Sitnik

903 followers · starred Jul 2015

Scott Addie

420 followers · starred Sep 2016

Erik Schierboom

598 followers · starred Feb 2015