DRAFT: add fix command line option and fix --check
- add fix command option
- add fix --check option for not altering the code
From the 3 commits existing in this PR, is there any reason to separate commit 1st and 2nd?
Ummm I remember the first commit being only fixes to what janus wrote. the second commit is what you tasked me to do :thinking:
the second commit is what you tasked me to do 🤔
Separation is not needed just because one commit is from one author and another commit from another. (Besides, did you keep his code in the end or you rewrote from scratch?). If there's a need to squash 2 commits from different authors, you just use the tag Co-authored-by: Jon Doe <[email protected]> at the end of the commit message.
the second commit is what you tasked me to do thinking
Separation is not needed just because one commit is from one author and another commit from another. (Besides, did you keep his code in the end or you rewrote from scratch?). If there's a need to squash 2 commits from different authors, you just use the tag
Co-authored-by: Jon Doe <[email protected]>at the end of the commit message.
In the end, I used his code. I think I should merge commits then :thinking:
In the end, I used his code. I think I should merge commits then
Sure let's do it. BTW let's rather use the word "squash", not "merge", to not confuse with the "git merge" command (which we should almost never use btw) :)
In the end, I used his code. I think I should merge commits then
Sure let's do it. BTW let's rather use the word "squash", not "merge", to not confuse with the "git merge" command (which we should almost never use btw) :)
yeah you are right :D
Co-authored-by: parhamsaremi [email protected]
Nit, the bit before the e-mail address should be in Name Surname format, not username. Unless you have anything against that?
Co-authored-by: parhamsaremi [email protected]
Nit, the bit before the e-mail address should be in Name Surname format, not username. Unless you have anything against that?
hmmmm OK sure thinking I don't have anything against it, I just preferred my username, but since my username is my Name and Surname I don't see any problem switching.
I've looked closely at SuggestedFix type.
And it has 2 fields that are supposed to serve the same purpose:
/// Text to be replaced.
FromText
and
/// Location of the text to be replaced.
FromRange
It's not stated anywhere how these fields are supposed to be used.
In practice, TestRuleBase.ApplyQuickFix uses only FromRange.
This PR uses only FromText (that's buggy because there might be other occurrences of FromText in source that are not meant to be replaced).