Created
March 1, 2018 14:56
-
-
Save alekseypotapov-dev/461b217b3b51f9064328c56f1b4860db to your computer and use it in GitHub Desktop.
Currently using this swiftlint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SwiftLint configuration file | |
# | |
# Used for DEBUG builds. | |
# | |
# rule identifiers to exclude from running | |
disabled_rules: | |
- line_length # to be used | |
- function_body_length | |
- type_body_length | |
- unused_optional_binding | |
- trailing_whitespace # just because | |
- file_length # to be used | |
- cyclomatic_complexity | |
- class_delegate_protocol | |
- discarded_notification_center_observer | |
# paths to ignore during linting. Takes precedence over `included`. | |
excluded: | |
- Pods | |
- Build | |
# custom behaviour | |
function_parameter_count: | |
warning: 20 | |
implicit_getter: | |
severity: warning | |
todo: | |
severity: warning # should solve all TODOs | |
identifier_name: | |
min_length: 2 | |
# 1 for generic Name | |
type_name: | |
min_length: 1 | |
max_length: 70 | |
custom_rules: | |
objc_to_swift_documentation_update: | |
included: ".*\\.swift" | |
excluded: ".*Test\\.swift" | |
name: "Swift-like documentation" | |
regex: "(@brief)" | |
match_kinds: | |
- comment | |
message: "Try: cmd+alt(option)+/ and check Apple Markup Formatting Reference" | |
severity: warning | |
#function_body_newline: | |
# included: ".*\\.swift" | |
# excluded: ".*Test\\.swift" | |
# name: "Function body newline" | |
# regex: "((func )(.*?)(\n( *)\n))" | |
# match_kinds: | |
# - comment | |
# - string | |
# - typeidentifier | |
# - parameter | |
# - identifier | |
# - keyword | |
# - argument | |
# - objectliteral | |
# - string_interpolation_anchor | |
# - placeholder | |
# message: "Function body newline should be avoided" | |
# severity: warning | |
#row_to_cell_naming_update: | |
# included: ".*\\.swift" | |
# excluded: ".*Test\\.swift" | |
# name: "UITableViewCell/*ViewModel/*Model naming" | |
# regex: "Row" | |
# match_kinds: | |
# - typeidentifier | |
# message: "For UITableViewCell- and UICollectionViewCell-related items use *Cell but not *Row namings" | |
# severity: warning | |
view_model_naming_rule: | |
included: ".*\\.swift" | |
excluded: ".*Test\\.swift" | |
name: "ViewModel variable or identifier naming" | |
regex: "([m,M]odel[v,V]iew)" | |
match_kinds: | |
- comment | |
- string | |
- typeidentifier | |
- parameter | |
- identifier | |
- keyword | |
- argument | |
- objectliteral | |
- string_interpolation_anchor | |
- placeholder | |
message: "For ViewModel use *ViewModel but not *ModelView namings" | |
severity: error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment