codeformatter icon indicating copy to clipboard operation
codeformatter copied to clipboard

CodeFormatter doesn't handle several transforms

Open CIPop opened this issue 10 years ago • 0 comments

Please see https://github.com/dotnet/corefx/pull/3113 for issues encountered when running CodeFormatter on System.Net.Security.sln:

  1. If statements should always use {}
if (!_stream.CanRead) throw __Error.GetReadNotSupported();

// should be 

if (!_stream.CanRead) 
{
    throw __Error.GetReadNotSupported();
}
  1. Incorrect camel casing transform for private members:
 public abstract class AuthenticatedStream : Stream
 {
       private Stream _InnerStream;
       private bool _LeaveStreamOpen;
       // should be _innerStream, _leaveStreamOpen

  1. Order of modifiers:
override protected bool ReleaseHandle()
// Instead of:
protected override bool ReleaseHandle()

CIPop avatar Sep 11 '15 21:09 CIPop