我可以列出将使用 astyle 格式化的文件吗?

Can I list files that would be formatted with astyle?

本文关键字:格式化 文件 astyle 我可以      更新时间:2023-10-16

astyle是否有一个选项可以执行以下操作:

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

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

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


--dry-run 执行试运行,不对文件进行任何更改。报告将照常输出。