Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#region is not formatted #812

Closed
jods4 opened this issue Jan 30, 2023 · 0 comments · Fixed by #817
Closed

#region is not formatted #812

jods4 opened this issue Jan 30, 2023 · 0 comments · Fixed by #817
Milestone

Comments

@jods4
Copy link

jods4 commented Jan 30, 2023

Indent before #region should be fixed by formatting.

Source:

public class ClassName
{
            #region Ugly methods
    public int LongUglyMethod()
    {    
        return 42;
    }
            #endregion
}

Output of 0.22.0:

public class ClassName
{
            #region Ugly methods
    public int LongUglyMethod()
    {
        return 42;
    }
            #endregion
}

I think #region should be aligned with current identation (my preference), or always at 0:

public class ClassName
{
    // Apply current indentation:
    #region Ugly methods
    public int LongUglyMethod()
    {
        return 42;
    }
    #endregion
}

public class ClassName
{
    // Left-aligned:
#region Ugly methods
    public int LongUglyMethod()
    {
        return 42;
    }
#endregion
}
@belav belav added this to the 0.23.0 milestone Jan 30, 2023
belav added a commit that referenced this issue Jan 30, 2023
belav added a commit that referenced this issue Jan 30, 2023
belav added a commit that referenced this issue Feb 13, 2023
belav added a commit that referenced this issue Feb 13, 2023
* Progress towards properly indenting regions

closes #812

* WIP notes

* Potentially better approach to regions

* cleanup

* fixing issue from bad merge

* format file

* fixing serializer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants