Showing 607 of 607 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
func resetPayloadAt(_ at: Int, length: Int) { payload.resetBytes(in: at..<at+length) }
- Read upRead up
Identical blocks of code found in 2 locations. Consider refactoring. Open
guard data.count > 0 else { QueueFactory.getQueue().async { self.delegate?.didWrite(data: data, by: self) } return
- Read upRead up
Identical blocks of code found in 2 locations. Consider refactoring. Open
public override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { guard keyPath == "state" else { return }
- Read upRead up
Identical blocks of code found in 2 locations. Consider refactoring. Open
guard data.count > 0 else { QueueFactory.getQueue().async { self.delegate?.didWrite(data: data, by: self) } return
- Read upRead up
Identical blocks of code found in 2 locations. Consider refactoring. Open
override public func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { guard keyPath == "state" else { return }
- Read upRead up
Avoid too many return
statements within this function. Open
return socket === sock
Avoid too many return
statements within this function. Open
return nil
Avoid too many return
statements within this function. Open
return (IPAddress(ipv6InNetworkOrder: 0), IPAddress(ipv6InNetworkOrder: UInt128.max))
Avoid too many return
statements within this function. Open
return true
Avoid too many return
statements within this function. Open
return false
Avoid too many return
statements within this function. Open
return result
Avoid too many return
statements within this function. Open
return true
Avoid too many return
statements within this function. Open
return packet
Avoid too many return
statements within this function. Open
return (baseIP, baseIP)
Avoid too many return
statements within this function. Open
return (b, e)
Avoid too many return
statements within this function. Open
return nil
Similar blocks of code found in 2 locations. Consider refactoring. Open
let upperLowerBits = UInt128._variadicAdditionWithOverflowCount( bitSegment7.truncatedValue >> 32, bitSegment6.truncatedValue, bitSegment5.truncatedValue << 32, lowerLowerBits.overflowCount)
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
let lowerUpperBits = UInt128._variadicAdditionWithOverflowCount( bitSegment5.truncatedValue >> 32, bitSegment4.truncatedValue, bitSegment3.truncatedValue << 32, upperLowerBits.overflowCount)
- Read upRead up
Function matchDNS
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
override open func matchDNS(_ session: DNSSession, type: DNSSessionMatchType) -> DNSSessionMatchResult { guard type == .ip else { return .unknown }
- Read upRead up
Function parseAdapterFactoryManager
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
static func parseAdapterFactoryManager(_ config: Yaml) throws -> AdapterFactoryManager { var factoryDict: [String: AdapterFactory] = [:] factoryDict["direct"] = DirectAdapterFactory() guard let adapterConfigs = config.array else { throw ConfigurationParserError.noAdapterDefined
- Read upRead up