diff --git a/.swiftformat b/.swiftformat new file mode 100644 index 0000000..b4d6094 --- /dev/null +++ b/.swiftformat @@ -0,0 +1,9 @@ + +# exclude files +--exclude Carthage,Pods + +# change rules +--stripunusedargs closure-only + +# disable rules +--disable strongOutlets,numberFormatting,emptyBraces,andOperator diff --git a/.swiftlint.yml b/.swiftlint.yml new file mode 100644 index 0000000..723f368 --- /dev/null +++ b/.swiftlint.yml @@ -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 diff --git a/scripts/format.sh b/scripts/format.sh new file mode 100755 index 0000000..713528c --- /dev/null +++ b/scripts/format.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cd `dirname $0` +cd ../ + +./Pods/SwiftFormat/CommandLineTool/swiftformat FireTodo --config '.swiftformat'