How to get Visual Studio quick comments to add a space after the double slash to avoid SA1005?
My coworker tells me that you can also just hit Ctrl+K+C Ctrl+K+C (that is, apply commenting twice), and it will do ////code
. That will pass StyleCop. Do the uncomment shortcut key twice to undo. Apparently, StyleCop doesn't care if there's a space after four slashes, only after two.
It seems some people really like this rule behavior. People will comment out code with a single set of //
if they are playing around with stuff but do not want to forget and check it in that way. SA will fail and the code will not go in. Once you really mean to comment out of the code and check it in, then you comment it out again and you are good to go. This, they claim, has saved many from a bad check-in.