mirror of
https://github.com/cranci1/Sora.git
synced 2026-04-21 00:22:12 +00:00
98 lines
2.3 KiB
YAML
98 lines
2.3 KiB
YAML
# Directory and file filters
|
|
included:
|
|
- Source
|
|
|
|
# Enabled/disabled rules
|
|
analyzer_rules:
|
|
- unused_declaration
|
|
- unused_import
|
|
|
|
opt_in_rules:
|
|
- all
|
|
|
|
disabled_rules:
|
|
- anonymous_argument_in_multiline_closure
|
|
- async_without_await
|
|
- conditional_returns_on_newline
|
|
- contrasted_opening_brace
|
|
- convenience_type
|
|
- discouraged_optional_collection
|
|
- explicit_acl
|
|
- explicit_enum_raw_value
|
|
- explicit_top_level_acl
|
|
- explicit_type_interface
|
|
- file_types_order
|
|
- force_unwrapping
|
|
- function_default_parameter_at_end
|
|
- indentation_width
|
|
- missing_docs
|
|
- multiline_arguments
|
|
- multiline_arguments_brackets
|
|
- multiline_function_chains
|
|
- multiline_parameters_brackets
|
|
- no_extension_access_modifier
|
|
- no_grouping_extension
|
|
- no_magic_numbers
|
|
- one_declaration_per_file
|
|
- prefer_nimble
|
|
- prefixed_toplevel_constant
|
|
- required_deinit
|
|
- sorted_enum_cases
|
|
- strict_fileprivate
|
|
- switch_case_on_newline
|
|
- todo
|
|
- trailing_closure
|
|
- type_contents_order
|
|
- vertical_whitespace_between_cases
|
|
# newly added:
|
|
- multiple_closures_with_trailing_closure
|
|
- closure_body_length
|
|
- type_body_length
|
|
- file_name
|
|
- file_length
|
|
- line_length
|
|
- nesting
|
|
- legacy_objc_type
|
|
- function_body_length
|
|
- trailing_comma
|
|
- identifier_name
|
|
- discarded_notification_center_observer
|
|
- extension_access_modifier
|
|
- explicit_init
|
|
- superfluous_else
|
|
- discouraged_optional_boolean
|
|
- discouraged_none_name
|
|
- attributes
|
|
- prefer_key_path
|
|
- block_based_kvo
|
|
- for_where
|
|
# should be fixed sometimes:
|
|
- implicitly_unwrapped_optional
|
|
- cyclomatic_complexity
|
|
- unused_parameter
|
|
- fatal_error
|
|
- force_cast
|
|
- object_literal
|
|
|
|
large_tuple: 3
|
|
number_separator:
|
|
minimum_length: 5
|
|
redundant_type_annotation:
|
|
consider_default_literal_types_redundant: true
|
|
unneeded_override:
|
|
affect_initializers: true
|
|
unused_import:
|
|
always_keep_imports:
|
|
- SwiftSyntaxBuilder # we can't detect uses of string interpolation of swift syntax nodes
|
|
- SwiftLintFramework # now that this is a wrapper around other modules, don't treat as unused
|
|
|
|
# Custom rules
|
|
custom_rules:
|
|
fatal_error:
|
|
name: Fatal Error
|
|
excluded: "Tests/*"
|
|
message: Prefer using `queuedFatalError` over `fatalError` to avoid leaking compiler host machine paths.
|
|
regex: \bfatalError\b
|
|
match_kinds:
|
|
- identifier
|
|
severity: error
|