Skip to content

#if directive changes indentation #664

Closed as not planned
Closed as not planned

Description

@belav

Using the following code, if you change it between TODO and !TODO for the #if's, the indentation level changes.

Could we detect this somehow and make sure to use the indentation that visually makes sense? Or maybe this is so edgecase that we don't really care.

This is a real file that has the issue, it is probably incredibly rare. https://github.com/belav/csharpier-repos/blob/main/runtime/src/libraries/Common/src/System/Security/Cryptography/RSACng.EncryptDecrypt.cs

namespace Namespace
{
#if TODO
    public class ClassName
    {
#endif
    public class ClassName2 { }
#if TODO
    }
#endif
}

Activity

  1. added
    type:bug
    on May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:formattingtype:bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions