Skip to content

Conversation

@decanus
Copy link
Contributor

@decanus decanus commented Oct 16, 2019

No description provided.

transports[id] = transport
transports[id]?.delegate = self
transport.listen()
transport.listen(identity: UBID(repeating: 0, count: 0)) // @TODO

Choose a reason for hiding this comment

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

TODOs should be resolved.

type: CBUUID(string: "BEA3B031-76FB-4889-B3C7-000000000001"),
properties: [.read, .writeWithoutResponse, .notify],
value: nil,
permissions: [.writeable, .readable]

Choose a reason for hiding this comment

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

Colons should be next to the identifier when specifying a type and next to the key in dictionary literals.

}

if request.characteristic.uuid == identityCharacteristic.uuid {
delegate?.transport(self, didConnectToPeer: Addr(data), withAddr: Addr(request.central.identifier.bytes))

Choose a reason for hiding this comment

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

Line should be 120 characters or less: currently 121 characters

if characteristic.uuid == identityCharacteristic.uuid {
if let data = characteristic.value {
let addr = Addr(data)
peers[id] = addr;

Choose a reason for hiding this comment

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

Lines should not have trailing semicolons.

let sends = flood(message, data: data, transport: transport, peers: filtered)
if sends > 0 {
return
return filtered.forEach {

Choose a reason for hiding this comment

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

Avoid too many return statements within this function.

) {
add(central: central)
if characteristic.uuid == CoreBluetoothTransport.identityCharacteristic.uuid {
peripheral.updateValue(Data(identity), for: CoreBluetoothTransport.identityCharacteristic, onSubscribedCentrals: [central])

Choose a reason for hiding this comment

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

Line should be 120 characters or less: currently 135 characters

@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit e37e58f and detected 7 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 7

View more on Code Climate.

@decanus decanus mentioned this pull request May 7, 2020
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