Browse Source

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

Requires the CocodaPods 'xcodeproj' gem.
Daniel Alm 7 years ago
parent
commit
56652765b2
2 changed files with 9 additions and 0 deletions
  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