GitVersion icon indicating copy to clipboard operation
GitVersion copied to clipboard

Failing tests for issue #1802

Open arturcic opened this issue 5 years ago • 2 comments

Failing tests for #1802. Closes #1802. Reopen of #1947

arturcic avatar Feb 12 '20 15:02 arturcic

I tried looking at this, but the code inside AssemblyInfoFileUpdaterReplaceOrInsertAfterLastAssemblyAttributeOrAppend is quite convoluted. I would recommending splitting up a bit. It's easy to create a regex that does not match if a line is commented out, using a negative lookahead, e.g:

^(?!\/\/).*AssemblyVersion\s*\(.*\)\s*

however, it looks as if we try to replace in the whole AssemblyVersion.{vb,cs,fs} in one bit method. I would recommend just looping the file a line at a time, and replacing (skipping the commented lines), and register which of them we have replaced in the loop. And then, afterwards, we could add the ones we have not replaced (if desired). I can take another look at it, but I would recommend rewriting the logic a bit.

erikbra avatar Mar 01 '20 22:03 erikbra

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 30 '20 16:06 stale[bot]