【问题标题】:Is there a way for Uncrustify to return the style differences and not to correct them?Uncrustify 有没有办法返回样式差异而不是纠正它们?
【发布时间】:2014-06-03 18:26:32
【问题描述】:

我在 Obj-C 中使用 Uncrustify 进行一些代码样式,但我想通知开发人员他做错了什么并让他修改代码

有没有办法使用它来获得代码风格的差异?

谢谢

【问题讨论】:

    标签: objective-c xcode coding-style xcode5 uncrustify


    【解决方案1】:

    我没有看到 Uncrustify 内置任何内容,但您可以结合 diff 工具来实现:将 Uncrustify 的输出重定向到一个文件并使用 diff 创建一个补丁文件。

    uncrustify -f file1 -o file2
    diff -u file1 file2  >> mypatch.patch
    

    【讨论】:

      猜你喜欢
      • 2014-08-04
      • 2010-09-12
      • 1970-01-01
      • 1970-01-01
      • 2010-12-01
      • 2019-10-13
      • 2022-01-19
      • 2022-01-04
      • 2015-12-10
      相关资源
      最近更新 更多