Showing 226 of 312 total issues
Method dynamicMethod
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
Method dynamicMethod
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
Method dynamicMethod
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
Method dynamicMethod
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
Method dynamicMethod
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
Method dynamicMethod
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
Method dynamicMethod
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
Method dynamicMethod
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
Method dynamicMethod
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
Method dynamicMethod
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
Method dynamicMethod
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
Method dynamicMethod
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
Method dynamicMethod
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
Method dynamicMethod
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
Function runCall
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
static func runCall(for device: XYBluetoothDevice, operation: GattOperation) -> XYBluetoothResult {
var bleResult: XYBluetoothResult
if let selectedOp = operation.operation {
switch selectedOp {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function process
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static func process(for device: XYBluetoothDevice, operation: DefinedOperation) -> XYBluetoothResult {
if let xyDevice = self.deviceAsFinder(device) {
switch operation {
case .song:
_ = xyDevice.unlock()
Method getHumanBoundWitnessName
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
// todo find way to localise strings with flutter
fun getHumanBoundWitnessName(boundWitness: XyoBoundWitness, publicKey: ByteArray?): String {
if (boundWitness.numberOfParties == 1) {
if (getIndexForParty(boundWitness, 0) == 0) {
return "First block!"
Function getHumanHeuristics
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
static func getHumanHeuristics(boundWitness: XyoBoundWitness) -> [String: String] {
do {
var returnArray: [String: String] = [:]
guard let numberOfParties = try boundWitness.getNumberOfParties() else {
return [:]
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method fromBase58
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
/**
* Decodes the base58 string into a [ByteArray]
*
* @return the decoded data bytes
* @throws NumberFormatException if the string is not a valid base58 string
Function handle
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
guard let method = MethodRegistry(rawValue: call.method) else {
result(nil)
return
}