element-x-ios/.swiftlint.yml

81 lines
1.5 KiB
YAML
Raw Normal View History

2022-02-14 16:05:21 +00:00
disabled_rules:
- trailing_whitespace
- unused_setter_value
- redundant_discardable_let
- identifier_name
2022-02-14 16:05:21 +00:00
opt_in_rules:
- force_unwrapping
- private_action
- explicit_init
- shorthand_optional_binding
2022-02-14 16:05:21 +00:00
included:
- ElementX
- UnitTests
- UITests
- Tools/Scripts/Templates
excluded:
- IntegrationTests
- ElementX/Sources/Generated
2022-02-14 16:05:21 +00:00
line_length:
warning: 250
error: 1000
file_length:
2023-08-08 06:50:43 +00:00
warning: 1000
error: 1000
2022-02-14 16:05:21 +00:00
type_name:
min_length: 3
max_length:
2022-02-14 16:05:21 +00:00
warning: 150
error: 1000
type_body_length:
warning: 1000
error: 1000
function_body_length:
2023-08-08 06:50:43 +00:00
warning: 100
error: 100
2023-08-08 06:50:43 +00:00
cyclomatic_complexity:
ignores_case_statements: true
nesting:
type_level:
warning: 5
2022-02-14 16:05:21 +00:00
custom_rules:
vstack_spacing:
regex: "(?-s)VStack((?!spacing:).)*\\s*\\{"
match_kinds: identifier
message: "Please use explicit spacing in VStacks."
severity: warning
hstack_spacing:
regex: "(?-s)HStack((?!spacing:).)*\\s*\\{"
match_kinds: identifier
message: "Please use explicit spacing in HStacks."
severity: warning
2022-02-14 16:05:21 +00:00
print_deprecation:
regex: "\\b(print)\\b"
match_kinds: identifier
message: "MXLog should be used instead of print()"
severity: error
print_ln_deprecation:
regex: "\\b(println)\\b"
match_kinds: identifier
message: "MXLog should be used instead of println()"
severity: error
os_log_deprecation:
regex: "\\b(os_log)\\b"
match_kinds: identifier
message: "MXLog should be used instead of os_log()"
severity: error