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

Deprecate Task, use a Promise-based approach. v2.0.0 proposal #15

Merged
merged 44 commits into from Oct 8, 2019

Conversation

minuscorp
Copy link
Contributor

This PR deprecates a Task-based approach in favor of a more widespread architecture based in Promises see this for more information about the topic.

This highly simplifies the modeling of how the States are defined, being converted into promises with their fulfilled or rejected inner state and Swift.Result value with the final representation of the Promise.

@minuscorp minuscorp added the enhancement New feature or request label Sep 17, 2019
@minuscorp minuscorp self-assigned this Sep 17, 2019
@sebastianvarela
Copy link
Contributor

sebastianvarela commented Sep 17, 2019

1 Error
🚫 Failed due to SwiftLint errors
1 Warning
⚠️ Big PR, try to keep changes smaller if you can 😜

SwiftLint found issues

Warnings

File Line Reason
DispatcherTests.swift 48 Types should be nested at most 1 level deep (nesting)
PromiseTests.swift 54 An XCTFail call should include a description of the assertion. (xctfail_message)
PromiseTests.swift 71 An XCTFail call should include a description of the assertion. (xctfail_message)
ObservableTypeTests.swift 15 Variable name should be between 3 and 40 characters long: 'by' (identifier_name)
ObservableTypeTests.swift 34 Method 'setUp()' should call to super function (overridden_super_call)
PrimitiveSequenceTypeTests.swift 10 Variable name should be between 3 and 40 characters long: 'by' (identifier_name)
PrimitiveSequenceTypeTests.swift 29 Types should be nested at most 1 level deep (nesting)
PrimitiveSequenceTypeTests.swift 44 Types should be nested at most 1 level deep (nesting)
PrimitiveSequenceTypeTests.swift 45 Types should be nested at most 1 level deep (nesting)
ChainTests.swift 6 Types should be nested at most 1 level deep (nesting)

Errors

File Line Reason
ReducerTests.swift 19 Variable name should only contain alphanumeric characters: '_counter' (identifier_name)
ReducerTests.swift 50 Variable name should only contain alphanumeric characters: '_counter' (identifier_name)
ReducerTests.swift 73 Variable name should only contain alphanumeric characters: '_counter' (identifier_name)
ReducerTests.swift 102 Variable name should only contain alphanumeric characters: '_counter' (identifier_name)
ReducerTests.swift 128 Variable name should only contain alphanumeric characters: '_counter' (identifier_name)
XCTestManifests.swift 8 Variable name should only contain alphanumeric characters: '__allTests__ChainTests' (identifier_name)
XCTestManifests.swift 17 Variable name should only contain alphanumeric characters: '__allTests__DictionaryExtensionsTests' (identifier_name)
XCTestManifests.swift 27 Variable name should only contain alphanumeric characters: '__allTests__DispatchQueueTests' (identifier_name)
XCTestManifests.swift 36 Variable name should only contain alphanumeric characters: '__allTests__DispatcherTests' (identifier_name)
XCTestManifests.swift 47 Variable name should only contain alphanumeric characters: '__allTests__ObservableTypeTests' (identifier_name)
XCTestManifests.swift 58 Variable name should only contain alphanumeric characters: '__allTests__PrimitiveSequenceTypeTests' (identifier_name)
XCTestManifests.swift 71 Variable name should only contain alphanumeric characters: '__allTests__PromiseTests' (identifier_name)
XCTestManifests.swift 90 Variable name should only contain alphanumeric characters: '__allTests__ReducerTests' (identifier_name)
XCTestManifests.swift 100 Function name should start with a lowercase character: '__allTests()' (identifier_name)
ChainTests.swift 29 Force casts should be avoided. (force_cast)

Generated by 🚫 Danger

@codecov
Copy link

codecov bot commented Sep 17, 2019

Codecov Report

Merging #15 into master will increase coverage by 29.54%.
The diff coverage is 82.67%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #15       +/-   ##
===========================================
+ Coverage   51.98%   81.53%   +29.54%     
===========================================
  Files          18       16        -2     
  Lines         504      601       +97     
===========================================
+ Hits          262      490      +228     
+ Misses        242      111      -131
Flag Coverage Δ
#ios 81.53% <82.67%> (+29.54%) ⬆️
#mac ?
#osx 81.53% <82.67%> (?)
#tv ?
#tvos 81.53% <82.67%> (?)
Impacted Files Coverage Δ
Sources/Mini/StateType.swift 0% <ø> (ø)
Sources/Mini/Utils/PayloadAction.swift 0% <0%> (ø)
Sources/Mini/Utils/SharedDictionary.swift 60% <100%> (ø)
Sources/Mini/Dispatcher.swift 89.81% <100%> (ø)
Sources/Mini/ActionReducer.swift 100% <100%> (ø)
Sources/Mini/ReducerGroup.swift 100% <100%> (ø)
Sources/Mini/Utils/OrderedSet.swift 68.18% <100%> (ø)
...ni/Utils/Foundation/DispatchQueue+Extensions.swift 100% <100%> (ø)
Sources/Mini/Middleware.swift 100% <100%> (ø)
Sources/Mini/Store.swift 80% <55.55%> (ø)
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5ea19c8...46b8481. Read the comment docs.

Package.swift Outdated
@@ -29,7 +30,7 @@ let package = Package(
dependencies: ["RxSwift", "NIOConcurrencyHelpers"]),
.testTarget(
name: "MiniSwiftTests",
dependencies: ["MiniSwift", "RxSwift"]),
dependencies: ["MiniSwift", "NIOConcurrencyHelpers", "RxSwift", "Nimble", "RxTest", "RxBlocking"]),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Comma Violation: Collection literals should not have trailing commas. (trailing_comma)

self.box.seal(.failure(error))
return self
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

interface = JSON.parse(response)

# Write just the interface all to a file, in theory we can make a HTML version of this in the future
File.write("Documentation/Reference/Mini.swift", interface["key.sourcetext"])
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.


interface = JSON.parse(response)

# Write just the interface all to a file, in theory we can make a HTML version of this in the future
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [100/80]

.gsub("[CWD]", Dir.pwd)
.gsub("[TMP_DIR]", tmp_dir)

File.write("Scripts/data/request.yml", file)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

.gsub("[DEBUG_ROOT]", debug_dir)
.gsub("[SDK_ROOT]", sdk_dir)
.gsub("[CWD]", Dir.pwd)
.gsub("[TMP_DIR]", tmp_dir)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/MultilineMethodCallIndentation: Align .gsub with template on line 16.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

file = template
.gsub("[DEBUG_ROOT]", debug_dir)
.gsub("[SDK_ROOT]", sdk_dir)
.gsub("[CWD]", Dir.pwd)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/MultilineMethodCallIndentation: Align .gsub with template on line 16.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

@@ -0,0 +1,33 @@
#!/usr/bin/env ruby
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint/ScriptPermission: Script file update_docs.rb doesn't have execute permission.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

Rakefile Outdated
@@ -27,3 +27,8 @@ end
task(:test) do
sh('swift test')
end

task(:docs) do
sh('swift run sourcedocs generate --spm-module MiniSwift --output-folder Documentation/reference')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [100/80]

"rake docs",
"Scripts/update_changelog.sh",
],
],
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Comma Violation: Collection literals should not have trailing commas. (trailing_comma)

"before": [
"rake docs",
"Scripts/update_changelog.sh",
],
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Comma Violation: Collection literals should not have trailing commas. (trailing_comma)

"rocket": [
"before": [
"rake docs",
"Scripts/update_changelog.sh",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Comma Violation: Collection literals should not have trailing commas. (trailing_comma)

Package.swift Outdated
.package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.35.8"), // dev
.package(url: "https://github.com/shibapm/Rocket", from: "0.4.0"), // dev
.package(url: "https://github.com/Realm/SwiftLint", from: "0.28.1"), // dev
.package(url: "https://github.com/eneko/SourceDocs", from: "0.5.1"), // dev
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Comma Violation: Collection literals should not have trailing commas. (trailing_comma)

extension PrimitiveSequenceType where Self: RxSwift.ObservableConvertibleType, Self.Trait == RxSwift.SingleTrait {
public func dispatch<A>(action: A.Type, on dispatcher: MiniSwift.Dispatcher, mode: MiniSwift.Dispatcher.DispatchMode.UI = .async, fillOnError errorPayload: A.Payload? = nil) -> RxSwift.Disposable where A: MiniSwift.CompletableAction, Self.Element == A.Payload

public func dispatch<A>(action: A.Type, key: A.Key, on dispatcher: MiniSwift.Dispatcher, mode: MiniSwift.Dispatcher.DispatchMode.UI = .async, fillOnError errorPayload: A.Payload? = nil) -> RxSwift.Disposable where A: MiniSwift.KeyedCompletableAction, Self.Element == A.Payload
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 250 characters or less: currently 280 characters (line_length)

}

extension PrimitiveSequenceType where Self: RxSwift.ObservableConvertibleType, Self.Trait == RxSwift.SingleTrait {
public func dispatch<A>(action: A.Type, on dispatcher: MiniSwift.Dispatcher, mode: MiniSwift.Dispatcher.DispatchMode.UI = .async, fillOnError errorPayload: A.Payload? = nil) -> RxSwift.Disposable where A: MiniSwift.CompletableAction, Self.Element == A.Payload
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 250 characters or less: currently 263 characters (line_length)

extension ObservableType where Self.Element: MiniSwift.StoreType, Self.Element: RxSwift.ObservableType, Self.Element.Element == Self.Element.State {
public static func dispatch<A, Type, T>(using dispatcher: MiniSwift.Dispatcher, factory action: @autoclosure @escaping () -> A, taskMap: @escaping (Self.Element.State) -> T?, on store: Self.Element, lifetime: MiniSwift.Promises.Lifetime = .once) -> RxSwift.Observable<Self.Element.State> where A: MiniSwift.Action, T: MiniSwift.Promise<Type>

public static func dispatch<A, K, Type, T>(using dispatcher: MiniSwift.Dispatcher, factory action: @autoclosure @escaping () -> A, key: K, taskMap: @escaping (Self.Element.State) -> [K: T], on store: Self.Element, lifetime: MiniSwift.Promises.Lifetime = .once) -> RxSwift.Observable<Self.Element.State> where A: MiniSwift.Action, K: Hashable, T: MiniSwift.Promise<Type>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 250 characters or less: currently 373 characters (line_length)

}

extension ObservableType where Self.Element: MiniSwift.StoreType, Self.Element: RxSwift.ObservableType, Self.Element.Element == Self.Element.State {
public static func dispatch<A, Type, T>(using dispatcher: MiniSwift.Dispatcher, factory action: @autoclosure @escaping () -> A, taskMap: @escaping (Self.Element.State) -> T?, on store: Self.Element, lifetime: MiniSwift.Promises.Lifetime = .once) -> RxSwift.Observable<Self.Element.State> where A: MiniSwift.Action, T: MiniSwift.Promise<Type>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 250 characters or less: currently 345 characters (line_length)


public subscript(_: Key, orPut _: @autoclosure () -> Value) -> Value { get }

public subscript(_: Key) -> Value? { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implicit Getter Violation: Computed read-only subscripts should avoid using the get keyword. (implicit_getter)


public func get(withKey key: Key) -> Value?

public subscript(_: Key, orPut _: @autoclosure () -> Value) -> Value { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implicit Getter Violation: Computed read-only subscripts should avoid using the get keyword. (implicit_getter)

init(promise: MiniSwift.Promise<Self.Payload?>)
}

@dynamicMemberLookup public final class Promise<T>: MiniSwift.PromiseType {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Attributes Violation: Attributes should be on their own lines in functions and types, but on the same line as variables and imports. (attributes)


/// Returns the item at the given index.
/// Assertion fails if the index is out of the range of [0, count).
public subscript(_: Int) -> T { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implicit Getter Violation: Computed read-only subscripts should avoid using the get keyword. (implicit_getter)


public final class Dispatcher {
public struct DispatchMode {
public enum UI {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nesting Violation: Types should be nested at most 1 level deep (nesting)
Type Name Violation: Type name should be between 3 and 40 characters long: 'UI' (type_name)

@minuscorp minuscorp marked this pull request as ready for review September 30, 2019 14:30
@minuscorp minuscorp changed the title Draft proposal: Deprecate Task, use a Promise-based approach Deprecate Task, use a Promise-based approach. v2.0.0 proposal Sep 30, 2019
("test_reset_state", test_reset_state),
("test_state_received_in_store", test_state_received_in_store),
("test_subscribe_to_store_receive_actions", test_subscribe_to_store_receive_actions),
("test_subscribe_to_store_receive_multiple_actions", test_subscribe_to_store_receive_multiple_actions),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Comma Violation: Collection literals should not have trailing commas. (trailing_comma)

("test_success_task_with_expiration_setted", test_success_task_with_expiration_setted),
("test_success_task_with_expiration_setted_to_immediately", test_success_task_with_expiration_setted_to_immediately)
static let __allTests__ReducerTests = [
("test_dispatcher_triggers_action_in_reducer_group_reducer", test_dispatcher_triggers_action_in_reducer_group_reducer),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 120 characters or less: currently 127 characters (line_length)

("test_expiration_of_task_created_with_past_date", test_expiration_of_task_created_with_past_date),
("test_success_task_with_expiration_setted", test_success_task_with_expiration_setted),
("test_success_task_with_expiration_setted_to_immediately", test_success_task_with_expiration_setted_to_immediately)
static let __allTests__ReducerTests = [
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identifier Name Violation: Variable name should only contain alphanumeric characters: '__allTests__ReducerTests' (identifier_name)

("test_is_rejected", test_is_rejected),
("test_is_resolved", test_is_resolved),
("test_promise_properties", test_promise_properties),
("test_reject", test_reject),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Comma Violation: Collection literals should not have trailing commas. (trailing_comma)

// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__PromiseTests = [
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identifier Name Violation: Variable name should only contain alphanumeric characters: '__allTests__PromiseTests' (identifier_name)

// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__DispatchQueueTests = [
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identifier Name Violation: Variable name should only contain alphanumeric characters: '__allTests__DispatchQueueTests' (identifier_name)

@@ -16,7 +16,16 @@ extension DictionaryExtensionsTests {
// to regenerate.
static let __allTests__DictionaryExtensionsTests = [
("test_get_or_put", test_get_or_put),
("test_unrapping_subscript", test_unrapping_subscript)
("test_unrapping_subscript", test_unrapping_subscript),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Comma Violation: Collection literals should not have trailing commas. (trailing_comma)

@@ -6,7 +6,7 @@ extension ChainTests {
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__ChainTests = [
("test_forwarding_chain_forwards_action", test_forwarding_chain_forwards_action)
("test_forwarding_chain_forwards_action", test_forwarding_chain_forwards_action),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Comma Violation: Collection literals should not have trailing commas. (trailing_comma)

@testable import MiniSwift

final class DispatchQueueTests: XCTestCase {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

.just(1)
.action(TestCompletableAction.self)
.toBlocking(timeout: 5.0).first() else { fatalError() }

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

}

func test_completable_action_action() throws {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

.contains(action: TestKeyedCompletableAction(promise: ["hello": .error(Error.dummy)]))
).toEventually(beTrue())
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

.error(Error.dummy)
.dispatch(action: TestKeyedCompletableAction.self, key: "hello", on: dispatcher)
.disposed(by: disposeBag)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

}

func test_keyed_completable_action_dispatch_error() {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

.contains(action: TestKeyedCompletableAction(promise: ["hello": .value(1)]))
).toEventually(beTrue())
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

self.testMiddleware.actions(of: TestCompletableAction.self).count
).toEventually(be(1))
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

.just(1)
.dispatch(action: TestCompletableAction.self, on: dispatcher)
.disposed(by: disposeBag)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

}

func test_completable_action_dispatch() {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

testMiddleware = TestMiddleware()
dispatcher.add(middleware: testMiddleware)
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


override func setUp() {
super.setUp()

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

var dispatcher: Dispatcher!
var disposeBag: DisposeBag!
var testMiddleware: TestMiddleware!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

}

}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

guard let action = other as? TestEmptyAction else { return false }
return promise == action.promise
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

required init(promise: Promise<Void>) {
self.promise = promise
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

class TestEmptyAction: EmptyAction {

let promise: Promise<Void>

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

class TestKeyedCompletableAction: KeyedCompletableAction {

typealias Payload = Int
typealias Key = String
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nesting Violation: Types should be nested at most 1 level deep (nesting)


class TestKeyedCompletableAction: KeyedCompletableAction {

typealias Payload = Int
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nesting Violation: Types should be nested at most 1 level deep (nesting)

}

class TestKeyedCompletableAction: KeyedCompletableAction {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

return counter == action.counter
}
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

required init(promise: Promise<Payload?>) {
counter = promise
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

typealias Payload = Int

let counter: Promise<Payload?>

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

class TestCompletableAction: CompletableAction {

typealias Payload = Int

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


class TestCompletableAction: CompletableAction {

typealias Payload = Int
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nesting Violation: Types should be nested at most 1 level deep (nesting)

fileprivate enum Error: Swift.Error { case dummy }

class TestCompletableAction: CompletableAction {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

final class PrimitiveSequenceTypeTests: XCTestCase {

fileprivate enum Error: Swift.Error { case dummy }

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

XCTAssertTrue(state.counter.error == nil)
XCTAssertEqual(state.counter.value, 1)
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

else {
fatalError()
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

store
.reducerGroup
.disposed(by: disposeBag)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

func test_dispatch_action_from_store() throws {
let dispatcher = Dispatcher()
let store = Store<TestState, TestStoreController>(TestState(), dispatcher: dispatcher, storeController: TestStoreController(dispatcher: dispatcher))

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


func test_dispatch_action_from_store() throws {
let dispatcher = Dispatcher()
let store = Store<TestState, TestStoreController>(TestState(), dispatcher: dispatcher, storeController: TestStoreController(dispatcher: dispatcher))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 120 characters or less: currently 156 characters (line_length)

.completed(20)
])
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

.disposed(by: disposeBag)

scheduler.start()

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

.filterOne { $0 == 20 }
.subscribe(filterOneObserver)
.disposed(by: disposeBag)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


func test_filter_one() {
let filterOneObserver = scheduler.createObserver(Int.self)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


var scheduler: TestScheduler!
var disposeBag: DisposeBag!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

XCTAssertTrue(promise1 == promise2)

}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

let promise2: Promise<Int> = .pending()

XCTAssertTrue(promise1 == promise2)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


let promise1: Promise<Int> = .pending()
let promise2: Promise<Int> = .pending()

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

}

func test_equality_pending() {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

XCTAssertFalse(promise1 == promise2)

}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

let promise2: Promise<Int> = .value(2)

XCTAssertFalse(promise1 == promise2)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


let promise1: Promise<Int> = .value(1)
let promise2: Promise<Int> = .value(2)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

}

func test_equality_with_value() {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


XCTAssertFalse(promise.value! == 2)
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

XCTAssertFalse(promise.isPending)

promise.fulfill(2)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

XCTAssertFalse(promise.isPending)

if case .success? = promise.result {
XCTFail()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XCTFail Message Violation: An XCTFail call should include a description of the assertion. (xctfail_message)

XCTAssertFalse(promise.isFulfilled)
XCTAssertTrue(promise.isResolved)
XCTAssertFalse(promise.isPending)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

XCTAssertFalse(promise.isFulfilled)

promise.reject(Error.dummy)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

let promise: Promise<Int> = Promise<Int>()

XCTAssertFalse(promise.isFulfilled)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


func test_reject() {
let promise: Promise<Int> = Promise<Int>()

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

-> Single<A> {
return Single.create { single in
let subscription = self.subscribe { event in
switch event {
case .completed:
let action = A(task: Task.requestSuccess(expiration), payload: nil)
let action = A.init(promise: .value(()))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explicit Init Violation: Explicitly calling .init() should be avoided. (explicit_init)

public func resolve(with other: [Key: Value]) -> Self {
return self.merging(other, uniquingKeysWith: { _, new in new })
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

}

extension Promise where T == Never {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

var isPending: Bool {
return !isIdle && (result == nil && !isCompleted)
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

box.fill(sealant)
properties = options
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

override func seal(_: T) {
// NO-OP
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

override func inspect() -> Sealant<T> {
return sealant
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

final class PreSealedBox<T>: Box<T> {

private var sealant: Sealant<T> = .completed

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

}

final class PreSealedBox<T>: Box<T> {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

@@ -159,7 +159,13 @@ public class OrderedSet<T: Comparable> {

/// For each function
public func forEach(_ body: (T) -> Swift.Void) {
return internalSet.forEach(body)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you use NSArray?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only NSArray has the functionality to make a concurrent access to its items, speeding up the Action spreading.

// swiftlint:disable:next explicit_init
let action = A.init(task: .requestFailure(error))
let action = A(promise: .error(error))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superfluous Disable Command Violation: SwiftLint rule 'explicit_init' did not trigger a violation in the disabled region. Please remove the disable command. (superfluous_disable_command)

switch completable {
case .completed:
// swiftlint:disable:next explicit_init
let action = A.init(task: .requestSuccess(expiration))
let action = A(promise: .never())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superfluous Disable Command Violation: SwiftLint rule 'explicit_init' did not trigger a violation in the disabled region. Please remove the disable command. (superfluous_disable_command)

action = A(promise: .value(errorPayload))
} else {
// swiftlint:disable:next explicit_init
action = A(promise: .error(error))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superfluous Disable Command Violation: SwiftLint rule 'explicit_init' did not trigger a violation in the disabled region. Please remove the disable command. (superfluous_disable_command)

var action: A
if let errorPayload = errorPayload {
// swiftlint:disable:next explicit_init
action = A(promise: .value(errorPayload))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superfluous Disable Command Violation: SwiftLint rule 'explicit_init' did not trigger a violation in the disabled region. Please remove the disable command. (superfluous_disable_command)

let subscription = self.subscribe(
onSuccess: { payload in
// swiftlint:disable:next explicit_init
let action = A.init(task: .requestSuccess(expiration), payload: payload)
let action = A(promise: .value(payload))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superfluous Disable Command Violation: SwiftLint rule 'explicit_init' did not trigger a violation in the disabled region. Please remove the disable command. (superfluous_disable_command)

var action: A
if let errorPayload = errorPayload {
// swiftlint:disable:next explicit_init
action = A(promise: .value(errorPayload))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superfluous Disable Command Violation: SwiftLint rule 'explicit_init' did not trigger a violation in the disabled region. Please remove the disable command. (superfluous_disable_command)

onSuccess: { payload in
// swiftlint:disable:next explicit_init
let action = A.init(task: .requestSuccess(expiration), payload: payload)
let action = A(promise: .value(payload))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superfluous Disable Command Violation: SwiftLint rule 'explicit_init' did not trigger a violation in the disabled region. Please remove the disable command. (superfluous_disable_command)

Package.swift Outdated
.testTarget(
name: "MiniSwiftTests",
dependencies: ["MiniSwift", "RxSwift"]),
dependencies: ["Mini", "TestMiddleware", "NIOConcurrencyHelpers", "RxSwift", "Nimble", "RxTest", "RxBlocking"]
), // dev
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Comma Violation: Collection literals should not have trailing commas. (trailing_comma)

Package.swift Outdated
.library(
name: "Mini/Test",
targets: ["Mini", "TestMiddleware"]
),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Comma Violation: Collection literals should not have trailing commas. (trailing_comma)

Package.swift Outdated
@@ -8,28 +8,67 @@ let package = Package(
platforms: [
.iOS(.v11),
.macOS(.v10_13),
.tvOS(.v11)
.tvOS(.v11),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Comma Violation: Collection literals should not have trailing commas. (trailing_comma)

Copy link
Contributor

@sebastianvarela sebastianvarela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to talk about the integrations made in this PR because you have several changes in tools, scripts, dependencies and this changes should be discussed with the team.

extension PrimitiveSequenceType where Self: RxSwift.ObservableConvertibleType, Self.Trait == RxSwift.SingleTrait {
public func dispatch<A>(action: A.Type, on dispatcher: MiniSwift.Dispatcher, mode: MiniSwift.Dispatcher.DispatchMode.UI = .async, fillOnError errorPayload: A.Payload? = nil) -> RxSwift.Disposable where A: MiniSwift.CompletableAction, Self.Element == A.Payload

public func dispatch<A>(action: A.Type, key: A.Key, on dispatcher: MiniSwift.Dispatcher, mode: MiniSwift.Dispatcher.DispatchMode.UI = .async, fillOnError errorPayload: A.Payload? = nil) -> RxSwift.Disposable where A: MiniSwift.KeyedCompletableAction, Self.Element == A.Payload
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 250 characters or less: currently 280 characters (line_length)

}

extension PrimitiveSequenceType where Self: RxSwift.ObservableConvertibleType, Self.Trait == RxSwift.SingleTrait {
public func dispatch<A>(action: A.Type, on dispatcher: MiniSwift.Dispatcher, mode: MiniSwift.Dispatcher.DispatchMode.UI = .async, fillOnError errorPayload: A.Payload? = nil) -> RxSwift.Disposable where A: MiniSwift.CompletableAction, Self.Element == A.Payload
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 250 characters or less: currently 263 characters (line_length)

extension ObservableType where Self.Element: MiniSwift.StoreType, Self.Element: RxSwift.ObservableType, Self.Element.Element == Self.Element.State {
public static func dispatch<A, Type, T>(using dispatcher: MiniSwift.Dispatcher, factory action: @autoclosure @escaping () -> A, taskMap: @escaping (Self.Element.State) -> T?, on store: Self.Element, lifetime: MiniSwift.Promises.Lifetime = .once) -> RxSwift.Observable<Self.Element.State> where A: MiniSwift.Action, T: MiniSwift.Promise<Type>

public static func dispatch<A, K, Type, T>(using dispatcher: MiniSwift.Dispatcher, factory action: @autoclosure @escaping () -> A, key: K, taskMap: @escaping (Self.Element.State) -> [K: T], on store: Self.Element, lifetime: MiniSwift.Promises.Lifetime = .once) -> RxSwift.Observable<Self.Element.State> where A: MiniSwift.Action, K: Hashable, T: MiniSwift.Promise<Type>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 250 characters or less: currently 373 characters (line_length)

}

extension ObservableType where Self.Element: MiniSwift.StoreType, Self.Element: RxSwift.ObservableType, Self.Element.Element == Self.Element.State {
public static func dispatch<A, Type, T>(using dispatcher: MiniSwift.Dispatcher, factory action: @autoclosure @escaping () -> A, taskMap: @escaping (Self.Element.State) -> T?, on store: Self.Element, lifetime: MiniSwift.Promises.Lifetime = .once) -> RxSwift.Observable<Self.Element.State> where A: MiniSwift.Action, T: MiniSwift.Promise<Type>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 250 characters or less: currently 345 characters (line_length)

}

extension DispatchQueue {
public static var isMain: Bool { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implicit Getter Violation: Computed read-only properties should avoid using the get keyword. (implicit_getter)


public subscript(_: Key, orPut _: @autoclosure () -> Value) -> Value { get }

public subscript(_: Key) -> Value? { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implicit Getter Violation: Computed read-only subscripts should avoid using the get keyword. (implicit_getter)


public func get(withKey key: Key) -> Value?

public subscript(_: Key, orPut _: @autoclosure () -> Value) -> Value { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implicit Getter Violation: Computed read-only subscripts should avoid using the get keyword. (implicit_getter)

}

public final class RootChain: MiniSwift.Chain {
public var proceed: MiniSwift.Next { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implicit Getter Violation: Computed read-only properties should avoid using the get keyword. (implicit_getter)

/**
- Returns: The error with which this promise was rejected or `nil` if this promise is pending or fulfilled.
*/
public var error: Error? { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implicit Getter Violation: Computed read-only properties should avoid using the get keyword. (implicit_getter)

/**
- Returns: The value with which this promise was fulfilled or `nil` if this promise is pending or rejected.
*/
public var value: T? { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implicit Getter Violation: Computed read-only properties should avoid using the get keyword. (implicit_getter)

/**
- Returns: `true` if the promise was rejected.
*/
public var isRejected: Bool { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implicit Getter Violation: Computed read-only properties should avoid using the get keyword. (implicit_getter)

/**
- Returns: `true` if the promise was fulfilled.
*/
public var isFulfilled: Bool { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implicit Getter Violation: Computed read-only properties should avoid using the get keyword. (implicit_getter)

/**
- Returns: `true` if the promise has resolved.
*/
public var isResolved: Bool { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implicit Getter Violation: Computed read-only properties should avoid using the get keyword. (implicit_getter)

/**
- Returns: `true` if the promise has not yet resolved.
*/
public var isPending: Bool { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implicit Getter Violation: Computed read-only properties should avoid using the get keyword. (implicit_getter)

/**
- Returns: `true` if the promise has not yet resolved nor pending.
*/
public var isIdle: Bool { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implicit Getter Violation: Computed read-only properties should avoid using the get keyword. (implicit_getter)

public init(initial: [T] = [])

/// Returns the number of elements in the OrderedSet.
public var count: Int { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implicit Getter Violation: Computed read-only properties should avoid using the get keyword. (implicit_getter)

public class LoggingService: MiniSwift.Service {
public var id: UUID

public var perform: MiniSwift.ServiceChain { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implicit Getter Violation: Computed read-only properties should avoid using the get keyword. (implicit_getter)

}

public final class ForwardingChain: MiniSwift.Chain {
public var proceed: MiniSwift.Next { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implicit Getter Violation: Computed read-only properties should avoid using the get keyword. (implicit_getter)

}
}

public var subscriptionCount: Int { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implicit Getter Violation: Computed read-only properties should avoid using the get keyword. (implicit_getter)


public final class Dispatcher {
public struct DispatchMode {
public enum UI {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nesting Violation: Types should be nested at most 1 level deep (nesting)
Type Name Violation: Type name should be between 3 and 40 characters long: 'UI' (type_name)

]
}

public func __allTests() -> [XCTestCaseEntry] {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identifier Name Violation: Function name should start with a lowercase character: '__allTests()' (identifier_name)

// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__ReducerTests = [
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identifier Name Violation: Variable name should only contain alphanumeric characters: '__allTests__ReducerTests' (identifier_name)

// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__PromiseTests = [
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identifier Name Violation: Variable name should only contain alphanumeric characters: '__allTests__PromiseTests' (identifier_name)

// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__PrimitiveSequenceTypeTests = [
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identifier Name Violation: Variable name should only contain alphanumeric characters: '__allTests__PrimitiveSequenceTypeTests' (identifier_name)

// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__ObservableTypeTests = [
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identifier Name Violation: Variable name should only contain alphanumeric characters: '__allTests__ObservableTypeTests' (identifier_name)

store
.map { $0.counter.value }
.filter { $0 != nil }
.subscribe(onNext: { _counter in
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identifier Name Violation: Variable name should only contain alphanumeric characters: '_counter' (identifier_name)

store
.map { $0.counter.value }
.filter { $0 != nil }
.subscribe(onNext: { _counter in
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identifier Name Violation: Variable name should only contain alphanumeric characters: '_counter' (identifier_name)

store
.map { $0.counter.value }
.filter { $0 != nil }
.subscribe(onNext: { _counter in
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identifier Name Violation: Variable name should only contain alphanumeric characters: '_counter' (identifier_name)

store
.map { $0.counter.value }
.filter { $0 != nil }
.subscribe(onNext: { _counter in
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identifier Name Violation: Variable name should only contain alphanumeric characters: '_counter' (identifier_name)

XCTAssertFalse(promise.isPending)

if case .failure? = promise.result {
XCTFail()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XCTFail Message Violation: An XCTFail call should include a description of the assertion. (xctfail_message)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants