Skip to content

Conversation

BlythMeister
Copy link
Contributor

Update the logic to take into account the start point when searching.

This fixes #867

@codecadwallader
Copy link
Owner

Thank you very much for putting this together. A couple thoughts:

  1. Can you please undo the common CodeMaid.config setting updates?
  2. When I pulled down this branch and utilized the code it did not seem to resolve CodeMaid reorders static new to new static #867 (the modifiers still flipped)?

@BlythMeister
Copy link
Contributor Author

Sorry, I didn't realise that I included that file. That was an error.
I'll give it another look. I tested on a method and it prevented the flip. I didn't test on the exact code in that issue. So will test with that too

@BlythMeister
Copy link
Contributor Author

@codecadwallader i've had a look and i think it's because it was an inline property and therefore had no { in it.
I've added ; for struct and property to handle these being inline.

I've also reverted that accidentally commited file :)

i've now tested with:

namespace ConsoleApp1
{
    internal class Test
    {
        internal static new int MyValue => 1;

        internal static new void DoStuff()
        { }
    }
}

@BlythMeister
Copy link
Contributor Author

@codecadwallader is this PR ok now to be included in the next release?
Having the setting disabled has meant the valid auto adding of modifiers has also stopped which is a little frustrating.

@codecadwallader
Copy link
Owner

Thanks for the updates! I was able to confirm the fix now too. Merging it in for the next release. I really appreciate your help!

@codecadwallader codecadwallader merged commit cbf2819 into codecadwallader:dev Feb 17, 2022
@codecadwallader codecadwallader added this to the v12.1 milestone Feb 17, 2022
@BlythMeister BlythMeister deleted the insert-fix branch July 14, 2022 10:27
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.

CodeMaid reorders static new to new static

2 participants