wikinee
V2EX  ›  问与答

有没有谁指导 Facebook 的 C++代码风格是怎么 lint 的

  •  
  •   wikinee · Jan 20, 2017 · 2054 views
    This topic created in 3426 days ago, the information mentioned may be changed or developed.
    有现成的工具吗
    3 replies    2017-01-20 22:37:14 +08:00
    whatot
        1
    whatot  
       Jan 20, 2017   ❤️ 1
    搜索 clang-format facebook 看到很多相关的.clang-format ,可以借鉴一些。
    类似于这个 https://github.com/facebook/facebook-clang-plugins/blob/master/.clang-format

    clang-format style 配置文档
    http://clang.llvm.org/docs/ClangFormatStyleOptions.html
    wikinee
        2
    wikinee  
    OP
       Jan 20, 2017
    @whatot 我用这个对着他自己的开源 C++项目试用了一遍,效果不好。我还是尽量参考源码吧,谢谢。
    whatot
        3
    whatot  
       Jan 20, 2017
    你可以根据配置与 facebook 的开源项目,配置出他们的风格。如果这样风格都不能统一,那就是项目的问题吧。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5779 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 01:42 · PVG 09:42 · LAX 18:42 · JFK 21:42
    ♥ Do have faith in what you're doing.