浏览代码

Add a script to fix the project's indentation settings.

Requires the CocodaPods 'xcodeproj' gem.
Daniel Alm 7 年之前
父节点
当前提交
56652765b2
共有 2 个文件被更改,包括 9 次插入0 次删除
  1. 2 0
      Makefile
  2. 7 0
      fix-indentation-settings.rb

+ 2 - 0
Makefile

@@ -8,6 +8,8 @@ all:
 	
 project:
 	swift package generate-xcodeproj
+	# Optional: set the generated project's indentation settings.
+	-ruby fix-indentation-settings.rb
 
 test:	all
 	swift test -v $(CFLAGS)

+ 7 - 0
fix-indentation-settings.rb

@@ -0,0 +1,7 @@
+require 'xcodeproj'
+project_path = './SwiftGRPC.xcodeproj'
+project = Xcodeproj::Project.open(project_path)
+project.main_group.uses_tabs = '0'
+project.main_group.tab_width = '2'
+project.main_group.indent_width = '2'
+project.save