我们目前使用Beyond Compare 3.0,我对此非常满意。但是,如果我可以轻松地为特定的一次性案例指定排除项,那就太好了。当我对一些重构进行代码审查时,这是需要的。例如:
旧代码
doSomething(ConstantsInterface.FOOBAR);
新代码:
doSomething(BetterEnumeration.FOOBAR);
在这种情况下,我正在审查数百个更改,这些更改基本上都是相同的更改,我只想查看例外情况。如果我可以轻松指定一个表明这两种情况相同的异常,那就太好了。我知道一种在语法中做到这一点的方法,但是在有十个左右例外的情况下,它是乏味和麻烦的。
还有其他提示吗?
We currently use Beyond Compare 3.0 and I am quite pleased with it. However, it would be great if I could easily specify an exclusion for a specific one-time case. This is needed when I am doing a code review of some refactoring. For instance:
Old code
doSomething(ConstantsInterface.FOOBAR);
New code:
doSomething(BetterEnumeration.FOOBAR);
In this case, I have hundreds of changes that I am reviewing that are essentially all the same exact change and I just want to see the exceptions. It would be great if I could easily specify an exception that indicates these two cases are equal. I know of a way to do it in the grammar, but it is tedious and cumbersome in the case where there are ten or so exceptions.
Any other tips?
发布评论
评论(2)
Beyond Compare 的专业版支持忽略重命名的标识符。 此处的帮助中对此进行了介绍,并且有一个视频演示此处。它也不仅限于标识符;它可以处理诸如
i=i+1
=> 之类的事情i++
。如果您安装了最新版本,您只需右键单击差异并选择“替换...”即可开始。Beyond Compare's Pro edition supports ignoring renamed identifiers. It's covered in the help here, and there's a video demonstration of it here. It's not limited to just identifiers either; it can handle things like
i=i+1
=>i++
. If you have a recent version installed you can just right click on the difference and select "Replacement..." to get started.1)编写一行正则表达式将它们全部切换回来。
2) 比较,查看任何异常
3) 反向运行步骤 1 中的正则表达式
5 分钟内完成
1) Write one line regex to switch them all back.
2) Diff, see any exceptions
3) Run reverse of regex in step 1
Done in 5 minutes