美文网首页
Objective-C 代码格式化

Objective-C 代码格式化

作者: yxibng | 来源:发表于2020-02-14 16:15 被阅读0次

参考文章:

  1. clone

    # 进入一个目录DIR,clone 工程
    cd $DIR
    git clone https://github.com/square/spacecommander.git
    
  2. setup formatter in your repo

    # 进入自己的工程目录,初始化配置
    cd $YOUR_REPO
    bash $DIR/spacecommander/setup-repo.sh
    
  3. add alias to .zshrc or .bash_profile,添加别名,方便调用

    # 初始化
    alias clangformatsetup="$DIR/spacecommander/setup-repo.sh"
    # 格式化对应文件
    alias clangformatfile="$DIR/spacecommander/format-objc-file.sh"
    # 格式化所有暂存文件
    alias clangformatfiles="$DIR/spacecommander/format-objc-files.sh"
    # 格式化整个仓库
    alias clangformatall="$DIR/spacecommander/format-objc-files-in-repo.sh
    
    

相关文章

网友评论

      本文标题:Objective-C 代码格式化

      本文链接:https://www.haomeiwen.com/subject/skqjfhtx.html