Deprecated
This commit is contained in:
parent
65937d7853
commit
7651c5ff29
152
.swiftlint.yml
152
.swiftlint.yml
|
|
@ -1,152 +0,0 @@
|
|||
opt_in_rules:
|
||||
- closure_spacing
|
||||
- closure_end_indentation
|
||||
- conditional_returns_on_newline
|
||||
|
||||
- empty_count
|
||||
- explicit_init
|
||||
- extension_access_modifier
|
||||
|
||||
- fatal_error_message
|
||||
- file_header
|
||||
- first_where
|
||||
- force_unwrapping
|
||||
|
||||
- implicit_return
|
||||
|
||||
- let_var_whitespace
|
||||
|
||||
- multiline_parameters
|
||||
|
||||
- nimble_operator - discuss
|
||||
- number_separator
|
||||
|
||||
- object_literal
|
||||
- overridden_super_call
|
||||
|
||||
- private_outlet
|
||||
- prohibited_super_call
|
||||
|
||||
- redundant_nil_coalescing
|
||||
|
||||
- unneeded_parentheses_in_closure_argument
|
||||
|
||||
- vertical_parameter_alignment_on_call
|
||||
|
||||
excluded:
|
||||
- Carthage
|
||||
- Pods
|
||||
- Generated
|
||||
|
||||
line_length: 128
|
||||
|
||||
cyclomatic_complexity:
|
||||
ignores_case_statements: true
|
||||
|
||||
type_body_length:
|
||||
- 500 # warning
|
||||
- 700 # error
|
||||
|
||||
file_length:
|
||||
warning: 500
|
||||
error: 1200
|
||||
|
||||
function_parameter_count:
|
||||
error: 5
|
||||
|
||||
identifier_name:
|
||||
excluded:
|
||||
- id
|
||||
- ok
|
||||
- URL
|
||||
- x
|
||||
- y
|
||||
- z
|
||||
|
||||
warning_threshold: 1
|
||||
|
||||
custom_rules:
|
||||
uiwebview_disabled:
|
||||
included: ".*.swift"
|
||||
name: "UIWebView Usage Disabled"
|
||||
regex: 'UIWebView'
|
||||
message: "Do not use UIWebView. Use WKWebView Instead. https://developer.apple.com/reference/uikit/uiwebview"
|
||||
severity: error
|
||||
|
||||
native_print:
|
||||
name: "print -> DDLog"
|
||||
regex: '(print|NSLog)\('
|
||||
message: "Please use CocoaLumberjack instead `print` and `NSlog`"
|
||||
severity: error
|
||||
|
||||
zero:
|
||||
name: "Short .zero"
|
||||
regex: '\(top: 0, left: 0, bottom: 0, right: 0\)'
|
||||
message: "Please use short init `.zero`."
|
||||
severity: error
|
||||
|
||||
private_variable:
|
||||
name: "Private variable"
|
||||
regex: '(?<!private\s\w*)let\s\w*(:|(\s=))\sVariable'
|
||||
message: "Please use (file)private with variable."
|
||||
severity: error
|
||||
|
||||
let_variable:
|
||||
name: "Let Variable"
|
||||
regex: 'var\s\w*(:|(\s=))\sVariable'
|
||||
message: "Please make variable using `let`."
|
||||
severity: error
|
||||
|
||||
marks_style:
|
||||
name: "Marks"
|
||||
regex: '// MARK: -?[a-zA-Z0-9]'
|
||||
message: "Marks should follow the following structure: // MARK: - Comment."
|
||||
severity: warning
|
||||
|
||||
no_header_comments:
|
||||
name: "Header Comments"
|
||||
regex: '//\s*Created by.*\s*//\s*Copyright'
|
||||
match_kinds:
|
||||
- comment
|
||||
message: "Template header comments should be removed."
|
||||
|
||||
delegate:
|
||||
name: "Delegate"
|
||||
regex: '(?<!weak\s)var\s\w*(D|d)elegate\w*:'
|
||||
message: "Please use `weak` for `delegate`. "
|
||||
severity: error
|
||||
|
||||
unnecessary_type:
|
||||
name: "Unnecessary Type"
|
||||
regex: '[ @a-zA-Z]*(?:let|var)\s\w*: ([a-zA-Z0-9]*)\?? = \1'
|
||||
message: "Type definition not needed"
|
||||
severity: error
|
||||
|
||||
unowned:
|
||||
name: "Unowned"
|
||||
regex: 'unowned'
|
||||
message: "Please use `weak` instead. "
|
||||
severity: error
|
||||
|
||||
inout_keyword:
|
||||
name: "Inout"
|
||||
regex: 'inout'
|
||||
message: "Don't use inout arguments"
|
||||
severity: error
|
||||
match_kinds: keyword
|
||||
|
||||
continue_keyword:
|
||||
name: "Continue"
|
||||
regex: 'continue'
|
||||
message: "Don't use continue instruction"
|
||||
severity: error
|
||||
match_kinds: keyword
|
||||
|
||||
cyrillic_strings:
|
||||
name: "Cyrillic strings"
|
||||
regex: '[а-яА-Я]+'
|
||||
message: "Localize or translate"
|
||||
severity: error
|
||||
match_kinds:
|
||||
- identifier
|
||||
- string
|
||||
|
|
@ -1,5 +1,9 @@
|
|||
# iOS code-quality
|
||||
|
||||
# Deprecated 25/01/2018
|
||||
|
||||
Look at [BuildScripts](https://github.com/TouchInstinct/BuildScripts/tree/master/xcode), described [here](https://github.com/TouchInstinct/Styleguide/blob/master/IOS/Guides/BuildScripts/Build_Scripts_Guide.md).
|
||||
|
||||
## 3.10.2017
|
||||
|
||||
- Remove `simple_ban` rule due to swiftlint working with regex bug.
|
||||
Loading…
Reference in New Issue