Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Reduce amount of requests to download localization #307

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

serhii-londar
Copy link
Collaborator

Add saving downloaded files timestamps.
Download files only when saved file timestamp is not equal to manifest timestamp.
Add minimum update interval for downloading manifest.

Download files only when saved file timestamp is not equal to manifest timestamp.
# Conflicts:
#	Example/AppleReminders/SceneDelegate.swift
#	Example/Podfile.lock
#	Sources/CrowdinSDK/Features/RealtimeUpdateFeature/Extensions/CrowdinSDK+ReatimeUpdates.swift
#	Sources/CrowdinSDK/Features/RealtimeUpdateFeature/LocalizationProvider/RURemoteLocalizationStorage.swift
#	Sources/CrowdinSDK/Features/RealtimeUpdateFeature/RealtimeUpdateFeature.swift
#	Sources/CrowdinSDK/Features/ScreenshotFeature/Extensions/CrowdinSDK+Screenshots.swift
#	Sources/CrowdinSDK/Features/ScreenshotFeature/ScreenshotUploader.swift
@crowdin-bot
Copy link
Collaborator

crowdin-bot commented Dec 8, 2024

Warnings
⚠️ Big PR, try to keep changes smaller if you can

SwiftLint found issues

Severity File Reason
Warning CrowdinLogsVC.swift:27 Use 'next', 'this' or 'previous' instead to disable the 'implicitly_unwrapped_optional' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning CrowdinLogsVC.swift:36 Use 'next', 'this' or 'previous' instead to disable the 'force_unwrapping' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning SettingsView.swift:121 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning FileStatus.swift:24 Colons should be next to the identifier when specifying a type and next to the key in dictionary literals (colon)
Warning CustomBundle.swift:57 Shorthand syntactic sugar should be used, i.e. [String: Int] instead of Dictionary<String, Int> (syntactic_sugar)
Warning CustomBundle.swift:67 Shorthand syntactic sugar should be used, i.e. [String: Int] instead of Dictionary<String, Int> (syntactic_sugar)
Error SettingsView+UITableView.swift:13 Function body should span 100 lines or less excluding comments and whitespace: currently spans 114 lines (function_body_length)
Warning ReadWriteProtocol.swift:33 Shorthand syntactic sugar should be used, i.e. [String: Int] instead of Dictionary<String, Int> (syntactic_sugar)
Warning ReadWriteProtocol.swift:50 TODOs should be resolved (Add custon JSONEncode & JSONDe...) (todo)
Error CrowdinFolder.swift:17 Enum element name 'Crowdin' should start with a lowercase character (identifier_name)
Error CrowdinFolder.swift:18 Enum element name 'Screenshots' should start with a lowercase character (identifier_name)
Warning File.swift:48 Use 'next', 'this' or 'previous' instead to disable the 'force_unwrapping' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning File.swift:76 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning FileTimestampStorage.swift:38 Lines should not have trailing whitespace (trailing_whitespace)
Warning FileTimestampStorage.swift:42 Lines should not have trailing whitespace (trailing_whitespace)
Warning CrowdinProviderConfig.swift:15 Lines should not have trailing whitespace (trailing_whitespace)
Warning CrowdinProviderConfig.swift:41 Lines should not have trailing whitespace (trailing_whitespace)
Error CrowdinRemoteLocalizationStorage.swift:27 Line should be 220 characters or less; currently it has 230 characters (line_length)
Warning CrowdinRemoteLocalizationStorage.swift:67 Line should be 200 characters or less; currently it has 202 characters (line_length)
Warning CrowdinRemoteLocalizationStorage.swift:60 Lines should not have trailing whitespace (trailing_whitespace)
Warning ManifestManager.swift:18 Lines should not have trailing whitespace (trailing_whitespace)
Warning ManifestManager.swift:20 Lines should not have trailing whitespace (trailing_whitespace)
Warning ManifestManager.swift:30 Lines should not have trailing whitespace (trailing_whitespace)
Warning ManifestManager.swift:83 Lines should not have trailing whitespace (trailing_whitespace)
Warning ManifestManager.swift:88 Lines should not have trailing whitespace (trailing_whitespace)
Warning ManifestManager.swift:93 Lines should not have trailing whitespace (trailing_whitespace)
Warning ManifestManager.swift:175 Lines should not have trailing whitespace (trailing_whitespace)
Warning CrowdinStringsDownloadOperation.swift:11 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinPluralsDownloadOperation.swift:11 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinLocalizationDownloader.swift:11 Use 'next', 'this' or 'previous' instead to disable the 'implicitly_unwrapped_optional' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning CrowdinLocalizationDownloader.swift:51 Function body should span 50 lines or less excluding comments and whitespace: currently spans 70 lines (function_body_length)
Warning CrowdinLocalizationDownloader.swift:51 Function should have 5 parameters or less: it currently has 7 (function_parameter_count)
Warning CrowdinLocalizationDownloader.swift:12 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinLocalizationDownloader.swift:15 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinLocalizationDownloader.swift:16 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinLocalizationDownloader.swift:17 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinLocalizationDownloader.swift:171 Lines should not have trailing whitespace (trailing_whitespace)
Error CrowdinXcstringsDownloadOperation.swift:160 Force tries should be avoided (force_try)
Warning CrowdinXcstringsDownloadOperation.swift:66 Tuples should have at most 2 members (large_tuple)
Warning CrowdinXcstringsDownloadOperation.swift:104 Tuples should have at most 2 members (large_tuple)
Warning CrowdinXcstringsDownloadOperation.swift:174 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Error UserDefaultsETagStorage.swift:16 Enum element name 'CrowdinETagsKey' should start with a lowercase character (identifier_name)
Warning CrowdinXliffDownloadOperation.swift:18 Function should have complexity 10 or less; currently complexity is 15 (cyclomatic_complexity)
Error CrowdinXliffDownloadOperation.swift:27 Line should be 220 characters or less; currently it has 242 characters (line_length)
Error CrowdinXliffDownloadOperation.swift:35 Line should be 220 characters or less; currently it has 242 characters (line_length)
Warning CrowdinXliffDownloadOperation.swift:68 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning FileEtagStorage.swift:15 Lines should not have trailing whitespace (trailing_whitespace)
Warning FileEtagStorage.swift:20 Lines should not have trailing whitespace (trailing_whitespace)
Warning FileEtagStorage.swift:29 Lines should not have trailing whitespace (trailing_whitespace)
Warning FileEtagStorage.swift:40 Lines should not have trailing whitespace (trailing_whitespace)
Warning FileEtagStorage.swift:47 Lines should not have trailing whitespace (trailing_whitespace)
Warning FileEtagStorage.swift:56 Lines should not have trailing whitespace (trailing_whitespace)
Warning FileEtagStorage.swift:67 Lines should not have trailing whitespace (trailing_whitespace)
Warning AsyncOperation.swift:47 Opening braces should be preceded by a single space and on the same line as the declaration (opening_brace)
Warning AsyncOperation.swift:64 Opening braces should be preceded by a single space and on the same line as the declaration (opening_brace)
Warning AsyncOperation.swift:65 Opening braces should be preceded by a single space and on the same line as the declaration (opening_brace)
Warning AsyncOperation.swift:65 Use contains instead (reduce_boolean)
Warning CrowdinSDKConfig+CrowdinProvider.swift:12 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Error CrowdinSDK+ReactNative.swift:78 Line should be 220 characters or less; currently it has 242 characters (line_length)
Warning CrowdinPluralsMappingDownloadOperation.swift:11 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinStringsMappingDownloadOperation.swift:11 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinXliffMappingDownloadOperation.swift:25 Function should have complexity 10 or less; currently complexity is 16 (cyclomatic_complexity)
Warning CrowdinXliffMappingDownloadOperation.swift:11 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinMappingDownloader.swift:17 Use 'next', 'this' or 'previous' instead to disable the 'implicitly_unwrapped_optional' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning CrowdinMappingDownloader.swift:41 Function should have 5 parameters or less: it currently has 6 (function_parameter_count)
Warning CrowdinMappingDownloader.swift:11 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinMappingDownloader.swift:14 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinMappingDownloader.swift:15 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinMappingDownloader.swift:16 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinSDKConfig+IntervalUpdate.swift:12 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinMappingManager.swift:23 Lines should not have trailing whitespace (trailing_whitespace)
Warning CrowdinMappingManager.swift:31 Lines should not have trailing whitespace (trailing_whitespace)
Warning CrowdinMappingManager.swift:40 Lines should not have trailing whitespace (trailing_whitespace)
Warning CrowdinSupportedLanguages.swift:27 Computed properties should first declare the getter and then the setter (computed_accessors_order)
Error CrowdinSupportedLanguages.swift:14 Enum element name 'SupportedLanguages' should start with a lowercase character (identifier_name)
Error CrowdinSupportedLanguages.swift:15 Enum element name 'Crowdin' should start with a lowercase character (identifier_name)
Warning CrowdinSupportedLanguages.swift:23 Line should be 200 characters or less; currently it has 204 characters (line_length)
Warning IntervalUpdateFeature.swift:23 Computed properties should first declare the getter and then the setter (computed_accessors_order)
Warning IntervalUpdateFeature.swift:39 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Error CrowdinSDK+Screenshots.swift:21 Line should be 220 characters or less; currently it has 345 characters (line_length)
Error CrowdinSDK+Screenshots.swift:97 Line should be 220 characters or less; currently it has 226 characters (line_length)
Warning ScreenshotFeature.swift:123 Line should be 200 characters or less; currently it has 213 characters (line_length)
Error UIWindow+KeyWindow.swift:12 Variable name 'cw_KeyWindow' should only contain alphanumeric and other allowed characters (identifier_name)
Warning ScreenshotInformationCollector.swift:42 Line should be 200 characters or less; currently it has 214 characters (line_length)
Warning ScreenshotUploader.swift:165 Function should have complexity 10 or less; currently complexity is 11 (cyclomatic_complexity)
Warning ScreenshotUploader.swift:165 Function body should span 50 lines or less excluding comments and whitespace: currently spans 59 lines (function_body_length)
Warning ScreenshotUploader.swift:60 Trailing closure syntax should not be used when passing more than one closure argument (multiple_closures_with_trailing_closure)
Warning ScreenshotUploader.swift:244 Opening braces should be preceded by a single space and on the same line as the declaration (opening_brace)
Warning ScreenshotUploader.swift:35 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning ScreenshotUploader.swift:95 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning ScreenshotUploader.swift:43 Lines should not have trailing whitespace (trailing_whitespace)
Warning CrowdinLoginConfig.swift:10 Line should be 200 characters or less; currently it has 211 characters (line_length)
Error CrowdinLoginConfig.swift:20 Line should be 220 characters or less; currently it has 242 characters (line_length)
Warning CrowdinLoginConfig.swift:28 Line should be 200 characters or less; currently it has 216 characters (line_length)
Error CrowdinLoginConfig.swift:30 Line should be 220 characters or less; currently it has 242 characters (line_length)
Warning CrowdinLoginConfig.swift:34 Line should be 200 characters or less; currently it has 216 characters (line_length)
Error CrowdinLoginConfig.swift:47 Line should be 220 characters or less; currently it has 231 characters (line_length)
Warning ScreenshotFeature+XCTest.swift:49 where clauses are preferred over a single if inside a for (for_where)
Warning ScreenshotFeature+XCTest.swift:103 Line should be 200 characters or less; currently it has 208 characters (line_length)
Error ScreenshotFeature+XCTest.swift:24 Prefer shorthand operators (+=, -=, *=, /=) over doing the operation and assigning (shorthand_operator)
Error ScreenshotFeature+XCTest.swift:38 Prefer shorthand operators (+=, -=, *=, /=) over doing the operation and assigning (shorthand_operator)
Warning CrowdinSocketManager.swift:15 When declaring properties in protocols, the order of accessors should be get set (protocol_property_accessors_order)
Warning CrowdinSocketManager.swift:16 When declaring properties in protocols, the order of accessors should be get set (protocol_property_accessors_order)
Warning CrowdinSocketManager.swift:17 When declaring properties in protocols, the order of accessors should be get set (protocol_property_accessors_order)
Warning CrowdinSocketManager.swift:18 When declaring properties in protocols, the order of accessors should be get set (protocol_property_accessors_order)
Warning CrowdinSocketManager.swift:19 When declaring properties in protocols, the order of accessors should be get set (protocol_property_accessors_order)
Warning CrowdinSocketManager.swift:36 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinSocketManager.swift:41 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinSocketManager.swift:46 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinSocketManager.swift:51 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinSocketManager.swift:52 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinSocketManager.swift:101 TODOs should be resolved (Fix in future:) (todo)
Warning BrowserLoginFeature.swift:36 Computed properties should first declare the getter and then the setter (computed_accessors_order)
Warning BrowserLoginFeature.swift:46 Computed properties should first declare the getter and then the setter (computed_accessors_order)
Warning BrowserLoginFeature.swift:56 Computed properties should first declare the getter and then the setter (computed_accessors_order)
Warning BrowserLoginFeature.swift:84 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning BrowserLoginFeature.swift:85 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning SocketAPI.swift:35 Use 'next', 'this' or 'previous' instead to disable the 'force_unwrapping' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning SocketAPI.swift:81 Function should have complexity 10 or less; currently complexity is 12 (cyclomatic_complexity)
Warning SocketAPI.swift:20 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning SocketAPI.swift:21 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning SocketAPI.swift:22 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning SocketAPI.swift:23 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning SocketAPI.swift:24 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning RULocalLocalizationStorage.swift:13 Use 'next', 'this' or 'previous' instead to disable the 'force_try' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning RURemoteLocalizationStorage.swift:22 Lines should not have trailing whitespace (trailing_whitespace)
Warning RealtimeUpdateFeature.swift:50 Computed properties should first declare the getter and then the setter (computed_accessors_order)
Error RealtimeUpdateFeature.swift:119 Function name '_start()' should start with a lowercase character (identifier_name)
Error RealtimeUpdateFeature.swift:120 Line should be 220 characters or less; currently it has 226 characters (line_length)
Error RealtimeUpdateFeature.swift:144 Line should be 220 characters or less; currently it has 430 characters (line_length)
Warning RealtimeUpdateFeature.swift:172 Line should be 200 characters or less; currently it has 201 characters (line_length)
Warning RealtimeUpdateFeature.swift:110 Trailing closure syntax should not be used when passing more than one closure argument (multiple_closures_with_trailing_closure)
Warning RealtimeUpdateFeature.swift:19 When declaring properties in protocols, the order of accessors should be get set (protocol_property_accessors_order)
Warning RealtimeUpdateFeature.swift:46 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning RealtimeUpdateFeature.swift:140 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning RealtimeUpdateFeature.swift:17 Lines should not have trailing whitespace (trailing_whitespace)
Warning RealtimeUpdateFeature.swift:22 Lines should not have trailing whitespace (trailing_whitespace)
Warning RealtimeUpdateFeature.swift:24 Lines should not have trailing whitespace (trailing_whitespace)
Warning RealtimeUpdateFeature.swift:62 Lines should not have trailing whitespace (trailing_whitespace)
Warning RealtimeUpdateFeature.swift:169 Lines should not have trailing whitespace (trailing_whitespace)
Error CrowdinSDK+ReatimeUpdates.swift:15 Line should be 220 characters or less; currently it has 347 characters (line_length)
Warning RUFilesDownloader.swift:19 The disabled 'implicitly_unwrapped_optional' rule was already disabled (blanket_disable_command)
Warning RUFilesDownloader.swift:19 Use 'next', 'this' or 'previous' instead to disable the 'implicitly_unwrapped_optional' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning RUFilesDownloader.swift:45 Function should have complexity 10 or less; currently complexity is 12 (cyclomatic_complexity)
Warning RUFilesDownloader.swift:120 where clauses are preferred over a single if inside a for (for_where)
Warning RUFilesDownloader.swift:45 Function body should span 50 lines or less excluding comments and whitespace: currently spans 59 lines (function_body_length)
Warning RUFilesDownloader.swift:15 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning RUFilesDownloader.swift:16 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning RUFilesDownloader.swift:17 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Error Constants.swift:15 Enum element name 'Crowdin' should start with a lowercase character (identifier_name)
Warning ObjectAssociation.swift:21 Use 'next', 'this' or 'previous' instead to disable the 'force_cast' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning Atomic.swift:18 Computed read-only properties should avoid using the get keyword (implicit_getter)
Warning Bundle+Application.swift:26 The disabled 'force_cast' rule was already disabled (blanket_disable_command)
Warning Bundle+Application.swift:32 The disabled 'force_cast' rule was already disabled (blanket_disable_command)
Warning Bundle+Application.swift:20 Use 'next', 'this' or 'previous' instead to disable the 'force_unwrapping' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning Bundle+Application.swift:32 Use 'next', 'this' or 'previous' instead to disable the 'force_cast' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Error StringParam.swift:114 Variable name 'pattern_int' should only contain alphanumeric and other allowed characters (identifier_name)
Error StringParam.swift:115 Variable name 'pattern_float' should only contain alphanumeric and other allowed characters (identifier_name)
Warning Locale.swift:24 TODOs should be resolved (find a better way of getting l...) (todo)
Warning Bundle+Language.swift:26 TODOs should be resolved (Add handling case when interse...) (todo)
Warning Bundle+Swizzle.swift:12 Use 'next', 'this' or 'previous' instead to disable the 'implicitly_unwrapped_optional' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning Bundle+Swizzle.swift:39 Use 'next', 'this' or 'previous' instead to disable the 'force_unwrapping' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning Label+Swizzle.swift:105 Use 'next', 'this' or 'previous' instead to disable the 'force_unwrapping' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning Label+Swizzle.swift:30 Use 'next', 'this' or 'previous' instead to disable the 'implicitly_unwrapped_optional' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning Label+Swizzle.swift:10 MARK comment should be in valid format. e.g. '// MARK: ...' or '// MARK: - ...' (mark)
Warning Label+Swizzle.swift:59 TODOs should be resolved (Add saving attributes.) (todo)
Warning Label+Swizzle.swift:97 TODOs should be resolved (Add saving attributes.) (todo)
Warning UIButton+Swizzle.swift:61 Use 'next', 'this' or 'previous' instead to disable the 'implicitly_unwrapped_optional' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning UIButton+Swizzle.swift:168 Use 'next', 'this' or 'previous' instead to disable the 'force_unwrapping' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning UIButton+Swizzle.swift:92 TODOs should be resolved (Add saving attributes.) (todo)
Warning UIButton+Swizzle.swift:137 TODOs should be resolved (Apply attributes.) (todo)
Warning UIButton+Swizzle.swift:160 TODOs should be resolved (Add saving attributes.) (todo)
Error UserDefaults.swift:18 Enum element name 'AppleLanguages' should start with a lowercase character (identifier_name)
Warning String.swift:136 Function should have complexity 10 or less; currently complexity is 14 (cyclomatic_complexity)
Warning String.swift:73 where clauses are preferred over a single if inside a for (for_where)
Error String.swift:14 Variable name 'cw_localized' should only contain alphanumeric and other allowed characters (identifier_name)
Error String.swift:56 Line should be 220 characters or less; currently it has 244 characters (line_length)
Error String.swift:130 Line should be 220 characters or less; currently it has 263 characters (line_length)
Warning CrowdinLogsCollector.swift:18 Computed read-only properties should avoid using the get keyword (implicit_getter)
Warning NSButton+Swizzle.swift:40 Use 'next', 'this' or 'previous' instead to disable the 'implicitly_unwrapped_optional' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning NSButton+Swizzle.swift:135 Use 'next', 'this' or 'previous' instead to disable the 'force_unwrapping' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning NSButton+Swizzle.swift:71 TODOs should be resolved (Add saving attributes.) (todo)
Warning NSButton+Swizzle.swift:104 TODOs should be resolved (Apply attributes.) (todo)
Warning NSButton+Swizzle.swift:127 TODOs should be resolved (Add saving attributes.) (todo)
Warning CrowidnLog.swift:37 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinSDK+PlatformsSupport.swift:94 Computed properties should first declare the getter and then the setter (computed_accessors_order)
Warning Localization.swift:26 Use 'next', 'this' or 'previous' instead to disable the 'implicitly_unwrapped_optional' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning Localization.swift:114 Colons should be next to the identifier when specifying a type and next to the key in dictionary literals (colon)
Warning Localization.swift:114 Colons should be next to the identifier when specifying a type and next to the key in dictionary literals (colon)
Warning Localization.swift:32 Computed properties should first declare the getter and then the setter (computed_accessors_order)
Warning Localization.swift:57 Computed properties should first declare the getter and then the setter (computed_accessors_order)
Error Localization.swift:12 Variable name '_provider' should only contain alphanumeric and other allowed characters (identifier_name)
Warning Localization.swift:47 Line should be 200 characters or less; currently it has 206 characters (line_length)
Warning Localization.swift:88 TODOs should be resolved (Add proper method to extractor...) (todo)
Warning LocalizationDataSource.swift:98 The disabled 'force_cast' rule was already disabled (blanket_disable_command)
Warning LocalizationDataSource.swift:98 Use 'next', 'this' or 'previous' instead to disable the 'force_cast' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning LocalizationDataSource.swift:77 Function should have complexity 10 or less; currently complexity is 14 (cyclomatic_complexity)
Warning LocalizationDataSource.swift:26 where clauses are preferred over a single if inside a for (for_where)
Warning LocalizationDataSource.swift:30 where clauses are preferred over a single if inside a for (for_where)
Warning LocalLocalizationStorage.swift:28 Use 'next', 'this' or 'previous' instead to disable the 'force_try' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Error LocalizationProvider.swift:35 Enum element name 'Plurals' should start with a lowercase character (identifier_name)
Error LocalizationProvider.swift:36 Enum element name 'LocalizableStringsdict' should start with a lowercase character (identifier_name)
Error LocalizationProvider.swift:171 Line should be 220 characters or less; currently it has 268 characters (line_length)
Warning InBundleLocalizationStorage.swift:67 Use 'next', 'this' or 'previous' instead to disable the 'force_unwrapping' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Error LocalLocalizationExtractor.swift:12 Enum element name 'LocalPlurals' should start with a lowercase character (identifier_name)
Error LocalLocalizationExtractor.swift:13 Enum element name 'LocalizableStringsdict' should start with a lowercase character (identifier_name)
Warning LocalLocalizationExtractor.swift:108 Line should be 200 characters or less; currently it has 207 characters (line_length)
Error LocalLocalizationExtractor.swift:116 Line should be 220 characters or less; currently it has 268 characters (line_length)
Warning LocalLocalizationExtractor.swift:106 Opening braces should be preceded by a single space and on the same line as the declaration (opening_brace)
Error LocalLocalizationExtractor.swift:71 Prefer shorthand operators (+=, -=, *=, /=) over doing the operation and assigning (shorthand_operator)
Warning CrowdinSDK.swift:53 Use 'next', 'this' or 'previous' instead to disable the 'implicitly_unwrapped_optional' rule once, or re-enable it as soon as possible (blanket_disable_command`)
Warning CrowdinSDK.swift:95 Line should be 200 characters or less; currently it has 208 characters (line_length)
Error ManifestResponse.swift:32 Line should be 220 characters or less; currently it has 272 characters (line_length)
Warning ManifestResponse.swift:60 Types should be nested at most 1 level deep (nesting)
Warning LoginAPI.swift:110 Trailing closure syntax should not be used when passing more than one closure argument (multiple_closures_with_trailing_closure)
Warning LoginAPI.swift:105 Initializing an optional variable with nil is redundant (redundant_optional_initialization)
Warning CrowdinContentDeliveryAPI.swift:54 MARK comment should be in valid format. e.g. '// MARK: ...' or '// MARK: - ...' (mark)
Warning CrowdinContentDeliveryAPI.swift:75 MARK comment should be in valid format. e.g. '// MARK: ...' or '// MARK: - ...' (mark)
Warning CrowdinContentDeliveryAPI.swift:91 MARK comment should be in valid format. e.g. '// MARK: ...' or '// MARK: - ...' (mark)
Warning CrowdinContentDeliveryAPI.swift:133 MARK comment should be in valid format. e.g. '// MARK: ...' or '// MARK: - ...' (mark)
Error LanguagesResponse.swift:73 Line should be 220 characters or less; currently it has 360 characters (line_length)
Error XMLParser.swift:11 Variable name 'TextKey' should start with a lowercase character (identifier_name)
Error XMLParser.swift:12 Variable name 'AttributesKey' should start with a lowercase character (identifier_name)
Error StorageAPI.swift:13 Enum element name 'CrowdinAPIFileName' should start with a lowercase character (identifier_name)
Error ScreenshotsAPI.swift:42 Line should be 220 characters or less; currently it has 226 characters (line_length)
Warning ScreenshotsAPI.swift:17 Opening braces should be preceded by a single space and on the same line as the declaration (opening_brace)
Warning ScreenshotsListResponse.swift:16 String enum values can be omitted when they are equal to the enumcase name (redundant_string_enum_value)
Warning ScreenshotsListResponse.swift:17 String enum values can be omitted when they are equal to the enumcase name (redundant_string_enum_value)
Warning ScreenshotsListResponse.swift:32 String enum values can be omitted when they are equal to the enumcase name (redundant_string_enum_value)
Warning ScreenshotsListResponse.swift:85 String enum values can be omitted when they are equal to the enumcase name (redundant_string_enum_value)
Warning ScreenshotsListResponse.swift:86 String enum values can be omitted when they are equal to the enumcase name (redundant_string_enum_value)
Warning ScreenshotsListResponse.swift:127 String enum values can be omitted when they are equal to the enumcase name (redundant_string_enum_value)
Warning ScreenshotsListResponse.swift:128 String enum values can be omitted when they are equal to the enumcase name (redundant_string_enum_value)
Warning ScreenshotsListResponse.swift:129 String enum values can be omitted when they are equal to the enumcase name (redundant_string_enum_value)
Warning ScreenshotsListResponse.swift:130 String enum values can be omitted when they are equal to the enumcase name (redundant_string_enum_value)
Warning ScreenshotsListResponse.swift:146 String enum values can be omitted when they are equal to the enumcase name (redundant_string_enum_value)
Warning ScreenshotsListResponse.swift:147 String enum values can be omitted when they are equal to the enumcase name (redundant_string_enum_value)
Warning CrowdinAPI.swift:49 Line should be 200 characters or less; currently it has 216 characters (line_length)
Warning CrowdinAPI.swift:95 Line should be 200 characters or less; currently it has 215 characters (line_length)
Warning CrowdinAPI.swift:141 Line should be 200 characters or less; currently it has 202 characters (line_length)

Generated by 🚫 Danger Swift against 6c58936

Copy link

codecov bot commented Dec 8, 2024

Codecov Report

Attention: Patch coverage is 69.81132% with 32 lines in your changes missing coverage. Please review.

Project coverage is 61.36%. Comparing base (5ca7858) to head (7d0a750).

Files with missing lines Patch % Lines
...ders/Crowdin/ManifestManager/ManifestManager.swift 74.29% 9 Missing ⚠️
...wdin/MappingDownloader/CrowdinMappingManager.swift 0.00% 9 Missing ⚠️
...tionDownloader/CrowdinLocalizationDownloader.swift 80.00% 5 Missing ⚠️
...Crowdin/ManifestManager/FileTimestampStorage.swift 83.34% 4 Missing ⚠️
...ers/Crowdin/CrowdinRemoteLocalizationStorage.swift 33.34% 2 Missing ⚠️
...rs/Crowdin/Extensions/CrowdinSDK+ReactNative.swift 0.00% 2 Missing ⚠️
...oviders/Crowdin/Config/CrowdinProviderConfig.swift 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #307      +/-   ##
==========================================
- Coverage   61.44%   61.36%   -0.07%     
==========================================
  Files         123      124       +1     
  Lines        4387     4448      +61     
==========================================
+ Hits         2695     2729      +34     
- Misses       1692     1719      +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andrii-bodnar andrii-bodnar changed the title feat: Reduce amount of requests to download localization. feat: Reduce amount of requests to download localization Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants