Merge pull request #170 from TouchInstinct/swiftlint_new_rules

update swiftlint rules for 0.39.1 version
This commit is contained in:
Ivan Smolin 2020-03-31 12:56:22 +03:00 committed by GitHub
commit 7a29254c2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 2 deletions

View File

@ -6,10 +6,17 @@ opt_in_rules:
- last_where
- empty_string
- empty_count
- contains_over_filter_count
- contains_over_filter_is_empty
- empty_collection_literal
- contains_over_range_nil_comparison
- contains_over_first_not_nil
- flatmap_over_map_reduce
# idiomatic
- legacy_random
- legacy_multiple
- pattern_matching_keywords
- redundant_nil_coalescing
- redundant_type_annotation
@ -45,6 +52,7 @@ opt_in_rules:
- conditional_returns_on_newline
- closure_spacing
- closure_end_indentation
- prefer_self_type_over_type_of_self
# lint
@ -52,9 +60,14 @@ opt_in_rules:
- private_outlet
- prohibited_super_call
- unused_import
- unused_private_declaration
- unused_declaration
- identical_operands
- overridden_super_call
- unowned_variable_capture
# metrics
- enum_case_associated_values_count
excluded:
- Carthage
@ -78,6 +91,13 @@ file_length:
function_parameter_count:
error: 5
colon:
flexible_right_spacing: true
enum_case_associated_values_count:
warning: 4
error: 5
identifier_name:
excluded:
- id

View File

@ -1,2 +1,2 @@
SOURCES_DIR=${1:-${PROJECT_NAME}} # first argument or PROJECT_NAME
SOURCES_DIR=${1:-${TARGET_NAME}} # first argument or TARGET_NAME
${PODS_ROOT}/SwiftLint/swiftlint autocorrect --path ${SOURCES_DIR} --config ${PROJECT_DIR}/build-scripts/xcode/.swiftlint.yml && ${PODS_ROOT}/SwiftLint/swiftlint --path ${SOURCES_DIR} --config ${PROJECT_DIR}/build-scripts/xcode/.swiftlint.yml