Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 58 additions & 12 deletions .swiftformat
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,66 @@
--header "\nCopyright © {year} Stream.io Inc. All rights reserved.\n"
--swiftversion 5.6

--ifdef no-indent
--disable redundantType
--disable extensionAccessControl
--disable andOperator
--disable hoistPatternLet
--disable typeSugar

--disable redundantGet # it removes get async throws from getters
# Use allow-list
--rules blankLinesAroundMark
--rules blankLinesAtEndOfScope
--rules blankLinesAtStartOfScope
--rules blankLinesBetweenScopes
--rules braces
--rules consecutiveBlankLines
--rules consecutiveSpaces
--rules duplicateImports
--rules elseOnSameLine
--rules emptyBraces
--rules enumNamespaces
--rules fileHeader
--rules indent
--rules initCoderUnavailable
--rules isEmpty
--rules leadingDelimiters
--rules linebreakAtEndOfFile
--rules linebreaks
--rules modifierOrder
--rules numberFormatting
--rules redundantBackticks
--rules redundantBreak
--rules redundantExtensionACL
--rules redundantFileprivate
--rules redundantLet
--rules redundantLetError
--rules redundantNilInit
--rules redundantObjc
--rules redundantPattern
--rules redundantRawValues
--rules redundantVoidReturnType
--rules semicolons
--rules sortedImports
--rules spaceAroundBraces
--rules spaceAroundBrackets
--rules spaceAroundComments
--rules spaceAroundGenerics
--rules spaceAroundOperators
--rules spaceAroundParens
--rules spaceInsideBraces
--rules spaceInsideBrackets
--rules spaceInsideComments
--rules spaceInsideGenerics
--rules spaceInsideParens
--rules strongOutlets
--rules strongifiedSelf
--rules todos
--rules trailingCommas
--rules trailingSpace
--rules unusedArguments
--rules void
--rules wrap
--rules wrapArguments
--rules wrapAttributes
--rules yodaConditions

# Rules inferred from Swift Standard Library:
--disable anyObjectProtocol, wrapMultilineStatementBraces
# Configuration for enabled rules
--ifdef no-indent
--indent 4
--enable isEmpty
--disable redundantParens # it generates mistakes for e.g. "if (a || b), let x = ... {}"
--semicolons inline
--nospaceoperators ..., ..< # what about ==, +=?
--commas inline
Expand Down
94 changes: 42 additions & 52 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,72 +18,62 @@ excluded:
- .ruby-lsp
- derived_data

disabled_rules:
- large_tuple
- multiple_closures_with_trailing_closure
- todo
- function_parameter_count
- type_name
- nesting
- identifier_name
- file_length
- type_body_length
- opening_brace
- line_length
- switch_case_alignment
- notification_center_detachment

# TODO: https://github.com/GetStream/ios-issues-tracking/issues/538
- attributes # it should be included in `opt_in_rules`
- orphaned_doc_comment
- void_function_in_ternary
- unneeded_synthesized_initializer
- ns_number_init_as_function_reference
- for_where

opt_in_rules:
- convenience_type
- empty_string
- fatal_error_message
- first_where
- toggle_bool
- identical_operands
only_rules:
- attribute_name_spacing
- closing_brace
- colon
- comma
- comment_spacing
- control_statement
- custom_rules
- cyclomatic_complexity
- duplicate_imports
- empty_enum_arguments
- empty_parameters
- empty_parentheses_with_trailing_closure
- file_name_no_space
- joined_default_parameter
- unavailable_function
- explicit_init
- leading_whitespace
- legacy_cggeometry_functions
- legacy_constant
- legacy_constructor
- legacy_nsgeometry_functions
- mark
- multiline_arguments
- no_space_in_method_call
- prefer_type_checking
- private_over_fileprivate
- private_unit_test
- protocol_property_accessors_order
- redundant_discardable_let
- redundant_objc_attribute
- redundant_optional_initialization
- redundant_sendable
- redundant_void_return
- return_arrow_whitespace
- syntactic_sugar
- multiline_arguments
- multiline_function_chains
- file_name_no_space

analyzer_rules:
- toggle_bool
- trailing_comma
- trailing_newline
- trailing_semicolon
- trailing_whitespace
- unneeded_break_in_switch
- unneeded_override
- unused_closure_parameter
- unused_control_flow_label
- unused_import
- vertical_whitespace
- void_return

multiline_arguments:
only_enforce_after_first_closure_on_first_line: true

# TODO: https://github.com/GetStream/ios-issues-tracking/issues/538
# attributes:
# always_on_same_line: ["@IBAction", "@NSManaged", "@objc"]
# always_on_line_above: ["@discardableResult"]

trailing_whitespace:
ignores_empty_lines: true

function_body_length:
warning: 150
error: 200

file_name_no_space:
severity: error

identifier_name:
excluded:
[r, g, b, a, x, y, z, dx, dy, dz, i, j, k, id, op, or, me, at, to, in]
allowed_symbols: ["_"]
validates_start_with_lowercase: "warning"

cyclomatic_complexity:
ignores_case_statements: true
warning: 25
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### 🔄 Changed

# [4.90.0](https://github.com/GetStream/stream-chat-swift/releases/tag/4.90.0)
_October 07, 2025_

## StreamChat
### ✅ Added
- Add support for push preferences [#3820](https://github.com/GetStream/stream-chat-swift/pull/3820)
- Add `CurrentChatUserController.setPushPreference(level:)`
- Add `CurrentChatUserController.snoozePushNotifications(until:)`
- Add `ChatChannelController.setPushPreference(level:)`
- Add `ChatChannelController.snoozePushNotifications(until:)`

# [4.89.0](https://github.com/GetStream/stream-chat-swift/releases/tag/4.89.0)
_September 22, 2025_

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ class DemoLivestreamChatChannelVC: _ViewController,
ChatMessageListVCDataSource,
ChatMessageListVCDelegate,
LivestreamChannelControllerDelegate,
EventsControllerDelegate
{
EventsControllerDelegate {
/// Controller for observing data changes within the channel.
var livestreamChannelController: LivestreamChannelController!

Expand Down
Loading
Loading