Skip to content

Commit

Permalink
Added swiftlint script to the repo 🙇
Browse files Browse the repository at this point in the history
  • Loading branch information
portellaa committed Apr 16, 2019
1 parent 625c44c commit a633750
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ disabled_rules:
- type_name
- identifier_name
opt_in_rules:
- closure_body_length
- closure_spacing
- closure_end_indentation
- collection_alignment
Expand All @@ -14,7 +15,6 @@ opt_in_rules:
- empty_string
- fallthrough
- fatal_error_message
- file_types_order
- first_where
- force_unwrapping
- identical_operands
Expand All @@ -28,6 +28,7 @@ opt_in_rules:
- multiline_literal_brackets
- multiline_parameters
- nslocalizedstring_key
- number_separator
- weak_delegate
- nimble_operator
- object_literal
Expand All @@ -42,7 +43,6 @@ opt_in_rules:
- sorted_imports
- toggle_bool
- trailing_closure
- type_contents_order
- unavailable_function
- unneeded_parentheses_in_closure_argument
- unused_import
Expand Down Expand Up @@ -81,7 +81,7 @@ number_separator:
minimum_length: 0

implicitly_unwrapped_optional:
mode: allExceptIBOutlets
mode: all_except_iboutlets

function_parameter_count:
warning: 8
Expand Down
9 changes: 9 additions & 0 deletions run_swiftlint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

set -x

if which swiftlint >/dev/null; then
swiftlint lint --strict --quiet
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi

0 comments on commit a633750

Please sign in to comment.