Skip to content

Fix case of modifier reorder with leading trivia#1855

Merged
belav merged 2 commits intobelav:mainfrom
mjvh80:modifiers-leading-trivia
May 2, 2026
Merged

Fix case of modifier reorder with leading trivia#1855
belav merged 2 commits intobelav:mainfrom
mjvh80:modifiers-leading-trivia

Conversation

@marcus-cellavision
Copy link
Copy Markdown
Contributor

Description

Formatting our code base I ran into a validation issue regarding the following code

namespace Models
{
    public class OrderListItemModel : BindableBase
    {
        // foobar
        override public int GetHashCode() => 67;
    }
}

The issue being when the modifiers are reordered the leading trivia // foobar is associated with a different modifier.

I had a go at fixing this issue.

Related Issue

n/a

Checklist

  • My code follows the project's code style
    • always var
    • follow existing naming conventions
    • always this.
    • no pointless comments
  • I will not force push after a code review of my PR has started
  • I have added tests that cover my changes

Copy link
Copy Markdown
Owner

@belav belav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for contributing the fix

@belav belav added this to the 1.3.0 milestone May 2, 2026
@belav belav enabled auto-merge (squash) May 2, 2026 17:29
@belav belav merged commit 03dd509 into belav:main May 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants