【问题标题】:Can I list files that would be formatted with astyle?我可以列出将用 astyle 格式化的文件吗?
【发布时间】:2015-02-11 06:19:00
【问题描述】:

astyle 是否有类似的选项:

"For the given list of files, list the files that *would be* modified by astyle."

所以,基本上列出不符合astyle的文件,但实际上不要更改它们。我浏览了手册页,找不到任何有用的东西。 astyle 创建 .orig 文件,我可以使用该信息,但我不想弄乱驱动器,即使 astyle 可以在事后进行清除。我真的很想要这样的选择。

【问题讨论】:

  • 很高兴知道为什么我得到了这个问题的-1?反馈很好,这样我就可以改进我的帖子。谢谢。
  • 好的,现在我很好;)对不起

标签: c++ c coding-style astyle


【解决方案1】:

astyle 有一个 --dry-run option,您可以使用它来执行此操作

--dry-run
在不更改文件的情况下执行试运行。报告将照常输出。

【讨论】:

  • 不错!在我找到的任何man 页面中都没有提到它,但建议检查源代码将是我的下一个建议。
猜你喜欢
  • 2019-05-01
  • 2011-08-13
  • 1970-01-01
  • 2021-05-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-09-20
相关资源
最近更新 更多