XYOracleNetwork/sdk-core-swift

View on GitHub

Showing 235 of 235 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

import Foundation

/// A repository to facilitate the storage of origin chain state related items. It is optional to implement a caching
/// mechanism behind this repo, but it is highly recomended. This repo does not need to persist any data until the
/// commit() function is called. No getter should have a defualt value.
Sources/sdk-core-swift/repositories/XyoOriginChainStateRepository.swift on lines 9..63

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 113.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    public func getValueCopy () throws -> XyoBuffer {
        let startIndex = 2 + (try getSchema()).getSizeIdentifier().rawValue + value.allowedOffset
        let endIndex = startIndex + (try getSize()) - (try getSchema()).getSizeIdentifier().rawValue
        try checkIndex(index: endIndex -  value.allowedOffset)

Severity: Major
Found in Sources/sdk-core-swift/objectmodel/XyoObjectStructure.swift and 1 other location - About 1 hr to fix
sdk-core-swift/objectmodel/XyoObjectStructure.swift on lines 33..39

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 113.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

import Foundation

/// A repository to facilitate the storage of origin chain state related items. It is optional to implement a caching
/// mechanism behind this repo, but it is highly recomended. This repo does not need to persist any data until the
/// commit() function is called. No getter should have a defualt value.
sdk-core-swift/repositories/XyoOriginChainStateRepository.swift on lines 9..63

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 113.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    public func getValueCopy () throws -> XyoBuffer {        
        let startIndex = 2 + (try getSchema()).getSizeIdentifier().rawValue + value.allowedOffset
        let endIndex = startIndex + (try getSize()) - (try getSchema()).getSizeIdentifier().rawValue
        try checkIndex(index: endIndex -  value.allowedOffset)
        
Severity: Major
Found in sdk-core-swift/objectmodel/XyoObjectStructure.swift and 1 other location - About 1 hr to fix
Sources/sdk-core-swift/objectmodel/XyoObjectStructure.swift on lines 33..39

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 113.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function doBoundWitnessWithPipe has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private func doBoundWitnessWithPipe (startingData : XyoIterableStructure?, handler : XyoNetworkHandler, choice : [UInt8], completion: @escaping (_: XyoBoundWitness?, _: XyoError?)->()) {
    
        do {
            let options = getBoundWitnessesOptionsForFlag(flag: choice)
            let additional = try getAdditionalPayloads(flag: choice, pipe: handler.pipe)
Severity: Minor
Found in sdk-core-swift/node/XyoOriginChainCreator.swift - About 1 hr to fix

    Function doBoundWitnessWithPipe has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private func doBoundWitnessWithPipe (startingData : XyoIterableStructure?, handler : XyoNetworkHandler, choice : [UInt8], completion: @escaping (_: XyoBoundWitness?, _: XyoError?)->()) {
        
            do {
                let options = getBoundWitnessesOptionsForFlag(flag: choice)
                let additional = try getAdditionalPayloads(flag: choice, pipe: handler.pipe)
    Severity: Minor
    Found in Sources/sdk-core-swift/node/XyoOriginChainCreator.swift - About 1 hr to fix

      Function doBoundWitnessWithPipe has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

          private func doBoundWitnessWithPipe (startingData : XyoIterableStructure?, handler : XyoNetworkHandler, choice : [UInt8], completion: @escaping (_: XyoBoundWitness?, _: XyoError?)->()) {
          
              do {
                  let options = getBoundWitnessesOptionsForFlag(flag: choice)
                  let additional = try getAdditionalPayloads(flag: choice, pipe: handler.pipe)
      Severity: Minor
      Found in sdk-core-swift/node/XyoOriginChainCreator.swift - About 1 hr to fix

      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 doBoundWitnessWithPipe has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

          private func doBoundWitnessWithPipe (startingData : XyoIterableStructure?, handler : XyoNetworkHandler, choice : [UInt8], completion: @escaping (_: XyoBoundWitness?, _: XyoError?)->()) {
          
              do {
                  let options = getBoundWitnessesOptionsForFlag(flag: choice)
                  let additional = try getAdditionalPayloads(flag: choice, pipe: handler.pipe)
      Severity: Minor
      Found in Sources/sdk-core-swift/node/XyoOriginChainCreator.swift - About 1 hr to fix

      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 base58FromBytes has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          static func base58FromBytes(_ bytes: [UInt8]) -> String {
              var bytes = bytes
              var zerosCount = 0
              var length = 0
      
      
      Severity: Minor
      Found in Sources/sdk-core-swift/objectmodel/XyoBase58.swift - About 1 hr to fix

        Function base58FromBytes has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            static func base58FromBytes(_ bytes: [UInt8]) -> String {
                var bytes = bytes
                var zerosCount = 0
                var length = 0
                
        Severity: Minor
        Found in sdk-core-swift/objectmodel/XyoBase58.swift - About 1 hr to fix

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

              func testGetPartyNumFromPublicKeyFalse () throws {
                  let rawBoundWitness = "6002012B201547201944000C4192BAF8FBA41F6B5CA997DF7634F1F33176E0DDA8F7B485C6CD2EBC3BA06D4EEC8BB98284DB33761BA8A7668D1A5C140384968A0BE3436067F10A0D6B7F5AAFFF201547201944000C41ED1512DA596726D8E19A592BBA5573D31174C424FDFD7A0D14B3088BD22F0EB520F99E19D78DBBD613B79277FEB2BD0911C4C379E69B8688CC744B5B5ACF928F20174A201A470009442100CAC1C5F12BCCEA80C176FCCEEFEC616E86A9F208F43E45D49E8F32F76278B9F8202ABFC11D935F56D5CFECFDC66D4CA37D67C69AE6CD3C1DB41794C3C7FF41FE90201749201A4600094320656984EF23EAD4304E4A1AB3321F64BF9629FFE0E3A4097B181C2295892578D2205B90DAD8607D3BE600209771E2A19EC9EA3BB7BEE9D44A99395E85577FBCDBB7".hexStringToBytes()
                  let rawPublicKey = "000C41ED1512DA596726D8E19A592BBA4573D31174C424FDFD7A0D14B3088BD22F0EB520F99E19D78DBBD613B79277FEB2BD0911C4C379E69B8688CC744B5B5ACF928F".hexStringToBytes()
                  let boundWitness = XyoBoundWitness(value: XyoBuffer(data: rawBoundWitness))
                  let publicKey = XyoIterableStructure(value: XyoBuffer(data: rawPublicKey))
          sdk-core-swiftTests/boundWitness/XyoBoundWitnessUtilTest.swift on lines 37..46

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 96.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

              func testGetPartyNumFromPublicKeyTrue () throws {
                  let rawBoundWitness = "6002012B201547201944000C4192BAF8FBA41F6B5CA997DF7634F1F33176E0DDA8F7B485C6CD2EBC3BA06D4EEC8BB98284DB33761BA8A7668D1A5C140384968A0BE3436067F10A0D6B7F5AAFFF201547201944000C41ED1512DA596726D8E19A592BBA5573D31174C424FDFD7A0D14B3088BD22F0EB520F99E19D78DBBD613B79277FEB2BD0911C4C379E69B8688CC744B5B5ACF928F20174A201A470009442100CAC1C5F12BCCEA80C176FCCEEFEC616E86A9F208F43E45D49E8F32F76278B9F8202ABFC11D935F56D5CFECFDC66D4CA37D67C69AE6CD3C1DB41794C3C7FF41FE90201749201A4600094320656984EF23EAD4304E4A1AB3321F64BF9629FFE0E3A4097B181C2295892578D2205B90DAD8607D3BE600209771E2A19EC9EA3BB7BEE9D44A99395E85577FBCDBB7".hexStringToBytes()
                  let rawPublicKey = "000C41ED1512DA596726D8E19A592BBA5573D31174C424FDFD7A0D14B3088BD22F0EB520F99E19D78DBBD613B79277FEB2BD0911C4C379E69B8688CC744B5B5ACF928F".hexStringToBytes()
                  let boundWitness = XyoBoundWitness(value: XyoBuffer(data: rawBoundWitness))
                  let publicKey = XyoIterableStructure(value: XyoBuffer(data: rawPublicKey))
          sdk-core-swiftTests/boundWitness/XyoBoundWitnessUtilTest.swift on lines 48..57

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 96.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Function base58FromBytes has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
          Open

              static func base58FromBytes(_ bytes: [UInt8]) -> String {
                  var bytes = bytes
                  var zerosCount = 0
                  var length = 0
                  
          Severity: Minor
          Found in sdk-core-swift/objectmodel/XyoBase58.swift - About 1 hr to fix

          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 base58FromBytes has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
          Open

              static func base58FromBytes(_ bytes: [UInt8]) -> String {
                  var bytes = bytes
                  var zerosCount = 0
                  var length = 0
          
          
          Severity: Minor
          Found in Sources/sdk-core-swift/objectmodel/XyoBase58.swift - About 1 hr to fix

          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

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

          extension ViewController : XyoNodeListener {
              // not needed
              func onBoundWitnessStart() {}
              func onBoundWitnessEndFailure() {}
              func onBoundWitnessDiscovered(boundWitness: XyoBoundWitness) {}
          Severity: Major
          Found in Sample/StarterCoreSwiftXYO/ViewControllerUpdated.swift and 1 other location - About 1 hr to fix
          Sample/StarterCoreSwiftXYO/ViewController.swift on lines 117..129

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 92.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

          extension ViewController : XyoNodeListener {
              // not needed
              func onBoundWitnessStart() {}
              func onBoundWitnessEndFailure() {}
              func onBoundWitnessDiscovered(boundWitness: XyoBoundWitness) {}
          Severity: Major
          Found in Sample/StarterCoreSwiftXYO/ViewController.swift and 1 other location - About 1 hr to fix
          Sample/StarterCoreSwiftXYO/ViewControllerUpdated.swift on lines 140..150

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 92.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

              public static void testVerifyPos() throws AssertFailException{
                  boolean result = false;
                  byte[] data = BaseEncoding.base16().lowerCase().decode("CF80CD8AED482D5D1527D7DC72FCEFF84E6326592848447D2DC0B0E87DFC9A90".toLowerCase()); //sha256hash of "testing"
                  byte[] sig = BaseEncoding.base16().lowerCase().decode("3044022079BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F817980220294F14E883B3F525B5367756C2A11EF6CF84B730B36C17CB0C56F0AAB2C98589".toLowerCase());
                  byte[] pub = BaseEncoding.base16().lowerCase().decode("040A629506E1B65CD9D2E0BA9C75DF9C4FED0DB16DC9625ED14397F0AFC836FAE595DC53F8B0EFE61E703075BD9B143BAC75EC0E19F82A2208CAEB32BE53414C40".toLowerCase());
          Carthage/Checkouts/secp256k1.swift/secp256k1/Classes/secp256k1/src/java/org/bitcoin/NativeSecp256k1Test.java on lines 31..40

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 91.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

              public static void testVerifyNeg() throws AssertFailException{
                  boolean result = false;
                  byte[] data = BaseEncoding.base16().lowerCase().decode("CF80CD8AED482D5D1527D7DC72FCEFF84E6326592848447D2DC0B0E87DFC9A91".toLowerCase()); //sha256hash of "testing"
                  byte[] sig = BaseEncoding.base16().lowerCase().decode("3044022079BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F817980220294F14E883B3F525B5367756C2A11EF6CF84B730B36C17CB0C56F0AAB2C98589".toLowerCase());
                  byte[] pub = BaseEncoding.base16().lowerCase().decode("040A629506E1B65CD9D2E0BA9C75DF9C4FED0DB16DC9625ED14397F0AFC836FAE595DC53F8B0EFE61E703075BD9B143BAC75EC0E19F82A2208CAEB32BE53414C40".toLowerCase());
          Carthage/Checkouts/secp256k1.swift/secp256k1/Classes/secp256k1/src/java/org/bitcoin/NativeSecp256k1Test.java on lines 18..26

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 91.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Function doBoundWitness has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public func doBoundWitness (transfer: XyoIterableStructure?, completion : @escaping (_: XyoError?)->()?) {
                  do {
                      if (cycles >= XyoZigZagBoundWitnessSession.maxNumberOfCycles) {
                          completion(XyoError.UNKNOWN_ERROR)
                          return
          Severity: Minor
          Found in sdk-core-swift/boundWitness/XyoZigZagBoundWitnessSession.swift - About 1 hr to fix

            Function doBoundWitness has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public func doBoundWitness (transfer: XyoIterableStructure?, completion : @escaping (_: XyoError?)->()?) {
                    do {
                        if (cycles >= XyoZigZagBoundWitnessSession.maxNumberOfCycles) {
                            completion(XyoError.UNKNOWN_ERROR)
                            return
              Severity
              Category
              Status
              Source
              Language