mirror of
https://github.com/bitwarden/ios.git
synced 2025-12-10 00:42:29 -06:00
116 lines
2.6 KiB
YAML
116 lines
2.6 KiB
YAML
analyzer_rules:
|
|
- unused_declaration
|
|
- unused_import
|
|
|
|
disabled_rules:
|
|
- non_optional_string_data_conversion
|
|
- todo
|
|
- trailing_whitespace # Covered by SwiftFormat
|
|
- vertical_whitespace # Covered by SwiftFormat
|
|
|
|
opt_in_rules:
|
|
- anonymous_argument_in_multiline_closure
|
|
- attributes
|
|
- closure_end_indentation
|
|
- closure_spacing
|
|
- collection_alignment
|
|
- contains_over_filter_count
|
|
- contains_over_filter_is_empty
|
|
- contains_over_first_not_nil
|
|
- contains_over_range_nil_comparison
|
|
- empty_collection_literal
|
|
- empty_count
|
|
- empty_string
|
|
- fallthrough
|
|
- file_name
|
|
- file_name_no_space
|
|
- first_where
|
|
- identical_operands
|
|
- missing_docs
|
|
- multiline_arguments
|
|
- multiline_parameters
|
|
- operator_usage_whitespace
|
|
- prefer_zero_over_explicit_init
|
|
- sorted_imports
|
|
- sorted_first_last
|
|
- static_operator
|
|
- toggle_bool
|
|
- type_contents_order
|
|
- unneeded_parentheses_in_closure_argument
|
|
- unowned_variable_capture
|
|
- yoda_condition
|
|
|
|
excluded:
|
|
- BitwardenShared/UI/Platform/Application/Support/Generated
|
|
- BitwardenWatchApp
|
|
- BitwardenWatchShared
|
|
- build
|
|
- vendor/bundle
|
|
- '**/Generated'
|
|
|
|
attributes:
|
|
always_on_same_line:
|
|
- "@Environment"
|
|
|
|
cyclomatic_complexity:
|
|
ignores_case_statements: true
|
|
|
|
multiline_arguments:
|
|
only_enforce_after_first_closure_on_first_line: true
|
|
|
|
trailing_comma:
|
|
mandatory_comma: true
|
|
|
|
type_contents_order:
|
|
order:
|
|
- case
|
|
- type_alias
|
|
- associated_type
|
|
- subtype
|
|
- type_property
|
|
- instance_property
|
|
- ib_inspectable
|
|
- ib_outlet
|
|
- initializer
|
|
- deinitializer
|
|
- type_method
|
|
- view_life_cycle_method
|
|
- ib_action
|
|
- other_method
|
|
- subscript
|
|
|
|
type_name:
|
|
max_length: 50
|
|
|
|
identifier_name:
|
|
excluded:
|
|
- id
|
|
|
|
inclusive_language:
|
|
override_allowed_terms:
|
|
- masterKey
|
|
- masterPassword
|
|
|
|
custom_rules:
|
|
style_guide_font:
|
|
name: "Style Guide Font"
|
|
regex: "(.font\\(.system)"
|
|
message: "Prefer using a style guide font over the system fonts, for example: \".font(.styleGuide(.body))\""
|
|
match_kinds:
|
|
- identifier
|
|
severity: warning
|
|
todo_without_jira:
|
|
name: "TODO without JIRA"
|
|
regex: "(TODO|TO DO|FIX|FIXME|FIX ME|todo)(?!: (BIT|PM|BWA)-[0-9]{1,})" # "TODO: BIT-123"
|
|
message: "All TODOs must be followed by a JIRA reference, for example: \"TODO: BIT-123\""
|
|
match_kinds:
|
|
- comment
|
|
severity: warning
|
|
weak_navigator:
|
|
name: "Weak Navigator"
|
|
regex: "(?<!weak )(var|let) \\w*[nN]avigator: \\w*Navigator"
|
|
message: "Navigator references must be weak to avoid memory leaks."
|
|
severity: error
|
|
excluded:
|
|
- ".*Tests\\.swift"
|