You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So i have been told that its not advisable to fix things outside the scope of the analyzers diagnostic but let me explain my use case
We are slowly migrating our assertions form NUnit Assert to shouldly. So I decide to write a code fix for this.
In order to do the fix i need to do two things
Modify the code to change Assert.IsTrue() to Should.BeTrue()
Check if the using statement contains shouldly and if not then add it
The code fix i have works, but when i try to bulk update it throws an exception, also it fails the unit test with an error about updating twice. I am assuming that these are linked (I maybe wrong though, im a bit new to code fixes)
I am using the DocumentEditor so i can make multiple changes to the document in on stage.
Here's my failing PR, a working copy has been merge to master and i'm able to use it, but not bulk update.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
So i have been told that its not advisable to fix things outside the scope of the analyzers diagnostic but let me explain my use case
We are slowly migrating our assertions form NUnit Assert to shouldly. So I decide to write a code fix for this.
In order to do the fix i need to do two things
The code fix i have works, but when i try to bulk update it throws an exception, also it fails the unit test with an error about updating twice. I am assuming that these are linked (I maybe wrong though, im a bit new to code fixes)
I am using the DocumentEditor so i can make multiple changes to the document in on stage.
Here's my failing PR, a working copy has been merge to master and i'm able to use it, but not bulk update.
agoda-com/Shouldly.FromAssert#6
Any help or advice would be appreciated
Beta Was this translation helpful? Give feedback.
All reactions