2022-02-14 18:05:21 +02:00
|
|
|
disabled_rules:
|
|
|
|
- trailing_whitespace
|
|
|
|
- unused_setter_value
|
2022-03-08 14:24:33 +02:00
|
|
|
- redundant_discardable_let
|
2022-04-29 12:36:49 +03:00
|
|
|
- identifier_name
|
2022-02-14 18:05:21 +02:00
|
|
|
|
|
|
|
opt_in_rules:
|
|
|
|
- force_unwrapping
|
|
|
|
- private_action
|
|
|
|
- explicit_init
|
2023-02-15 09:34:48 +00:00
|
|
|
- shorthand_optional_binding
|
2022-02-14 18:05:21 +02:00
|
|
|
|
|
|
|
included:
|
|
|
|
- ElementX
|
2022-09-12 21:34:53 +03:00
|
|
|
- UnitTests
|
|
|
|
- UITests
|
2022-05-12 12:44:07 +03:00
|
|
|
- Tools/Scripts/Templates
|
2022-08-18 16:32:29 +03:00
|
|
|
excluded:
|
|
|
|
- IntegrationTests
|
2023-08-01 16:55:59 +03:00
|
|
|
- ElementX/Sources/Generated
|
2022-02-14 18:05:21 +02:00
|
|
|
|
|
|
|
line_length:
|
|
|
|
warning: 250
|
|
|
|
error: 1000
|
|
|
|
|
|
|
|
file_length:
|
2024-07-18 18:28:30 +02:00
|
|
|
warning: 2000
|
2022-02-14 18:05:21 +02:00
|
|
|
|
|
|
|
type_name:
|
2023-02-06 16:38:54 +02:00
|
|
|
min_length: 3
|
|
|
|
max_length:
|
2022-02-14 18:05:21 +02:00
|
|
|
warning: 150
|
|
|
|
error: 1000
|
|
|
|
|
2022-06-06 13:05:47 +03:00
|
|
|
type_body_length:
|
2023-10-05 17:26:02 +03:00
|
|
|
warning: 1000
|
2022-06-06 13:05:47 +03:00
|
|
|
error: 1000
|
|
|
|
|
2023-02-06 16:38:54 +02:00
|
|
|
function_body_length:
|
2023-08-08 09:50:43 +03:00
|
|
|
warning: 100
|
2023-02-06 16:38:54 +02:00
|
|
|
error: 100
|
|
|
|
|
2023-08-08 09:50:43 +03:00
|
|
|
cyclomatic_complexity:
|
|
|
|
ignores_case_statements: true
|
|
|
|
|
2023-02-15 14:02:50 +00:00
|
|
|
nesting:
|
|
|
|
type_level:
|
|
|
|
warning: 5
|
|
|
|
|
2022-02-14 18:05:21 +02:00
|
|
|
custom_rules:
|
2023-11-14 12:38:38 +00:00
|
|
|
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
|
|
|
|
|
2024-09-24 12:24:03 +01:00
|
|
|
compound_color_conversion:
|
|
|
|
regex: "UIColor\\(\\.compound"
|
|
|
|
match_kinds: identifier
|
|
|
|
message: "Please use the UIColor token directly to ensure the colour scheme is honoured."
|
|
|
|
severity: warning
|
|
|
|
|
2022-02-14 18:05:21 +02: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
|