CotEditor/.swiftlint.yml

138 lines
2.7 KiB
YAML
Raw Normal View History

2019-05-18 03:04:51 +03:00
deployment_target:
2024-04-20 18:15:55 +03:00
macOS_deployment_target: 14
2017-02-15 14:38:24 +03:00
2020-03-04 04:11:43 +03:00
excluded:
2022-11-22 09:24:19 +03:00
- "*/.build"
2017-02-15 14:38:24 +03:00
2023-01-01 07:52:45 +03:00
analyzer_rules:
- capture_variable
- typesafe_array_init
- unused_declaration
2024-06-30 16:35:04 +03:00
- unused_import
2023-01-01 07:52:45 +03:00
2017-02-15 14:38:24 +03:00
opt_in_rules:
2017-10-06 05:58:12 +03:00
- array_init
2017-08-03 02:57:49 +03:00
- closure_end_indentation
2017-02-15 14:38:24 +03:00
- closure_spacing
2018-12-03 08:42:50 +03:00
- collection_alignment
2019-10-08 05:41:44 +03:00
- contains_over_filter_count
- contains_over_filter_is_empty
2018-08-06 07:06:19 +03:00
- contains_over_first_not_nil
2022-01-24 15:45:04 +03:00
- discarded_notification_center_observer
2021-09-10 10:07:12 +03:00
- discouraged_assert
2019-10-08 05:41:44 +03:00
- empty_collection_literal
- empty_string
2018-08-06 07:06:19 +03:00
- empty_xctest_method
2017-02-15 14:38:24 +03:00
- explicit_init
2018-06-23 05:03:26 +03:00
- fallthrough
2017-02-15 14:38:24 +03:00
- file_header
2022-01-24 15:45:04 +03:00
- file_name_no_space
2017-02-15 14:38:24 +03:00
- first_where
2019-10-30 05:30:18 +03:00
- flatmap_over_map_reduce
- ibinspectable_in_extension
2018-12-03 08:42:50 +03:00
- identical_operands
2017-10-06 05:58:12 +03:00
- joined_default_parameter
2019-01-10 04:27:35 +03:00
- last_where
2019-06-12 08:17:37 +03:00
- legacy_multiple
2017-08-03 02:57:49 +03:00
- let_var_whitespace
2019-05-18 03:04:51 +03:00
- lower_acl_than_parent
2018-08-06 07:06:19 +03:00
- multiline_function_chains
2017-08-03 02:57:49 +03:00
- multiline_parameters
2018-12-03 08:42:50 +03:00
- multiline_parameters_brackets
2017-08-03 02:57:49 +03:00
- nimble_operator
2020-01-05 04:45:46 +03:00
- optional_enum_case_matching
2019-05-18 03:04:51 +03:00
- overridden_super_call
2020-01-05 04:45:46 +03:00
- prefer_self_type_over_type_of_self
- prefer_zero_over_explicit_init
2017-02-15 14:38:24 +03:00
- private_outlet
2018-08-06 07:06:19 +03:00
- prohibited_super_call
2017-10-06 05:58:12 +03:00
- quick_discouraged_call
2017-11-14 03:22:18 +03:00
- quick_discouraged_focused_test
- quick_discouraged_pending_test
2019-10-30 05:30:18 +03:00
- raw_value_for_camel_cased_codable_enum
2019-05-18 03:04:51 +03:00
- reduce_into
2017-02-15 14:38:24 +03:00
- redundant_nil_coalescing
- required_enum_case
2019-05-18 03:04:51 +03:00
- single_test_class
2017-11-14 03:22:18 +03:00
- sorted_first_last
2018-12-03 08:42:50 +03:00
- toggle_bool
2017-08-03 02:57:49 +03:00
- vertical_parameter_alignment_on_call
2019-01-10 04:27:35 +03:00
- xct_specific_matcher
- yoda_condition
2017-02-15 14:38:24 +03:00
disabled_rules:
- block_based_kvo
2023-10-01 07:06:11 +03:00
- control_statement
2017-02-15 14:38:24 +03:00
- force_cast
- force_try
2024-06-19 14:10:29 +03:00
- identifier_name
2017-02-15 14:38:24 +03:00
- opening_brace
2024-06-02 09:44:33 +03:00
- static_over_final_class
2023-07-27 08:45:18 +03:00
- switch_case_alignment
2017-02-15 14:38:24 +03:00
- trailing_comma
2023-10-01 07:06:11 +03:00
- unneeded_override
2017-02-15 14:38:24 +03:00
trailing_whitespace:
ignores_empty_lines: true
function_parameter_count:
2020-01-22 07:35:37 +03:00
warning: 6
2022-11-22 09:24:19 +03:00
nesting:
type_level:
warning: 2
2017-02-15 14:38:24 +03:00
vertical_whitespace:
2020-02-23 08:18:40 +03:00
max_empty_lines: 3
2017-02-15 14:38:24 +03:00
file_length:
warning: 2000
2017-02-15 14:38:24 +03:00
line_length:
warning: 1000
type_body_length:
2024-06-30 16:35:04 +03:00
warning: 1000
2017-02-15 14:38:24 +03:00
function_body_length:
2024-02-29 15:41:06 +03:00
warning: 350
2022-11-22 09:24:19 +03:00
large_tuple:
warning: 3
2017-02-15 14:38:24 +03:00
cyclomatic_complexity:
2022-08-26 14:56:35 +03:00
warning: 30
2017-02-15 14:53:47 +03:00
2018-02-02 14:56:40 +03:00
identifier_name:
2017-02-16 07:50:57 +03:00
max_length:
2024-06-30 16:35:04 +03:00
warning: 50
2017-02-16 07:50:57 +03:00
min_length:
2018-02-02 14:56:40 +03:00
warning: 2
2017-02-16 07:50:57 +03:00
excluded:
2018-02-02 14:56:40 +03:00
- x
- y
2017-02-16 07:50:57 +03:00
2017-02-15 14:53:47 +03:00
custom_rules:
comment_space:
name: "Space After Comment"
regex: '//\S'
2017-02-15 14:53:47 +03:00
match_kinds:
- comment
message: "There should be a space after a comment delimiter."
severity: warning
inline_comment_spaces:
name: "Spaces Before Inline Comment"
regex: '\S ?//'
2017-02-15 14:53:47 +03:00
match_kinds:
- comment
message: "There should be more than 2 spaces before an inline comment."
severity: warning
empty_first_line:
name: "Empty First Line"
regex: '(^[ a-zA-Z ]*(?:protocol|extension|class|struct) (?!(?:var|let))[ a-zA-Z:]*\{\n *\S+)'
2017-02-15 14:53:47 +03:00
message: "There should be an empty line after a declaration"
severity: warning