Skip to content

Commit

Permalink
setup swiftformat.
Browse files Browse the repository at this point in the history
  • Loading branch information
sgr-ksmt committed Sep 29, 2019
1 parent 58d1713 commit b63bca9
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

# exclude files
--exclude Carthage,Pods

# change rules
--stripunusedargs closure-only

# disable rules
--disable strongOutlets,numberFormatting,emptyBraces,andOperator
35 changes: 35 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
disabled_rules:
- colon
- comma
- control_statement
- identifier_name
- type_name
- trailing_comma

opt_in_rules:
- empty_count

excluded:
- Carthage
- Pods
- vendor/bundle

force_cast: error

force_try:
severity: error

type_body_length:
- 300
- 400

function_body_length:
- 200
- 300

file_length:
warning: 500
error: 1000

type_name:
min_length: 4
5 changes: 5 additions & 0 deletions scripts/format.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
cd `dirname $0`
cd ../

./Pods/SwiftFormat/CommandLineTool/swiftformat FireTodo --config '.swiftformat'

0 comments on commit b63bca9

Please sign in to comment.