darkwallet/darkwallet

View on GitHub

Showing 903 of 903 total issues

Function 3 has 256 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"./core":3}],3:[function(require,module,exports){
;(function (root, factory) {
    if (typeof exports === "object") {
        // CommonJS
        module.exports = exports = factory();
Severity: Major
Found in src/vendors/crypto-js/cryptojs.js - About 1 day to fix

    Function 43 has 254 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{"buffer":46}],43:[function(require,module,exports){
    (function (Buffer){
    var assert = require('assert')
    var bufferutils = require('./bufferutils')
    var crypto = require('crypto')
    Severity: Major
    Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 1 day to fix

      Function Detector has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
      Open

      function Detector(image)
      {
          this.image=image;
          this.resultPointCallback = null;
          
      Severity: Minor
      Found in src/vendors/jsqrcode/jsqrcode.js - About 1 day 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

                  for (var offset = 0; offset < points.length && nudged; offset += 2)
                  {
                      var x = Math.floor (points[offset]);
                      var y = Math.floor( points[offset + 1]);
                      if (x < - 1 || x > width || y < - 1 || y > height)
      Severity: Major
      Found in src/vendors/jsqrcode/jsqrcode.js and 1 other location - About 1 day to fix
      src/vendors/jsqrcode/jsqrcode.js on lines 66..95

      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 233.

      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

                  for (var offset = points.length - 2; offset >= 0 && nudged; offset -= 2)
                  {
                      var x = Math.floor( points[offset]);
                      var y = Math.floor( points[offset + 1]);
                      if (x < - 1 || x > width || y < - 1 || y > height)
      Severity: Major
      Found in src/vendors/jsqrcode/jsqrcode.js and 1 other location - About 1 day to fix
      src/vendors/jsqrcode/jsqrcode.js on lines 34..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 233.

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

      function QRCodeDataBlockReader(blocks,  version,  numErrorCorrectionCode)
      {
          this.blockPointer = 0;
          this.bitPointer = 7;
          this.dataLength = 0;
      Severity: Major
      Found in src/vendors/jsqrcode/jsqrcode.js - About 1 day to fix

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

        },{"./ecsignature":33,"./opcodes":37,"./script":38,"./types":42,"assert":44,"buffer":46,"ecurve":24}],40:[function(require,module,exports){
        (function (Buffer){
        var assert = require('assert')
        var bufferutils = require('./bufferutils')
        var crypto = require('./crypto')
        Severity: Major
        Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 1 day to fix

          Function CryptoJS has 241 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              var CryptoJS = CryptoJS || (function (Math, undefined) {
                  /**
                   * CryptoJS namespace.
                   */
                  var C = {};
          Severity: Major
          Found in src/vendors/crypto-js/cryptojs.js - About 1 day to fix

            Function 31 has 232 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            },{"./core":3,"./sha512":31,"./x64-core":33}],31:[function(require,module,exports){
            ;(function (root, factory, undef) {
                if (typeof exports === "object") {
                    // CommonJS
                    module.exports = exports = factory(require("./core"), require("./x64-core"));
            Severity: Major
            Found in src/vendors/crypto-js/cryptojs.js - About 1 day to fix

              Function Detector has 218 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function Detector(image)
              {
                  this.image=image;
                  this.resultPointCallback = null;
                  
              Severity: Major
              Found in src/vendors/jsqrcode/jsqrcode.js - About 1 day to fix

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

                            _doFinalize: function () {
                                // Shortcuts
                                var data = this._data;
                                var dataWords = data.words;
                
                
                Severity: Major
                Found in src/vendors/crypto-js/cryptojs.js and 1 other location - About 1 day to fix
                src/vendors/crypto-js/cryptojs.js on lines 4683..4702

                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 205.

                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

                            _doFinalize: function () {
                                // Shortcuts
                                var data = this._data;
                                var dataWords = data.words;
                
                
                Severity: Major
                Found in src/vendors/crypto-js/cryptojs.js and 1 other location - About 1 day to fix
                src/vendors/crypto-js/cryptojs.js on lines 4402..4421

                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 205.

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

                },{"./address":27,"./bufferutils":28,"./hdnode":34,"./networks":36,"./script":38,"./transaction_builder":41,"./types":42,"assert":44,"buffer":46,"crypto":10}],44:[function(require,module,exports){
                // http://wiki.commonjs.org/wiki/Unit_Testing/1.0
                //
                // THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8!
                //
                Severity: Major
                Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 1 day to fix

                  Function 19 has 200 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  },{"util":68}],19:[function(require,module,exports){
                  var inherits = require('util').inherits
                  
                  module.exports = function (Buffer, Hash) {
                    var K = [
                  Severity: Major
                  Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 1 day to fix

                    Function 29 has 198 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    },{"./core":3}],29:[function(require,module,exports){
                    ;(function (root, factory, undef) {
                        if (typeof exports === "object") {
                            // CommonJS
                            module.exports = exports = factory(require("./core"), require("./x64-core"));
                    Severity: Major
                    Found in src/vendors/crypto-js/cryptojs.js - About 7 hrs to fix

                      Function ReedSolomonDecoder has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function ReedSolomonDecoder(field)
                      {
                          this.field = field;
                          this.decode=function(received,  twoS)
                          {
                      Severity: Minor
                      Found in src/vendors/jsqrcode/jsqrcode.js - About 7 hrs 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 exports has 197 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      module.exports = function (Buffer, Hash) {
                        var K = [
                          0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,
                          0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,
                          0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,
                      Severity: Major
                      Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 7 hrs to fix

                        Function 39 has 196 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        },{"./bufferutils":28,"./crypto":29,"./opcodes":37,"./types":42,"assert":44,"buffer":46}],39:[function(require,module,exports){
                        (function (Buffer){
                        var assert = require('assert')
                        var enforceType = require('./types')
                        var ops = require('./opcodes')
                        Severity: Major
                        Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 7 hrs to fix

                          Function 41 has 193 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          },{"./address":27,"./bufferutils":28,"./crypto":29,"./ecsignature":33,"./opcodes":37,"./script":38,"./scripts":39,"./types":42,"assert":44,"buffer":46}],41:[function(require,module,exports){
                          (function (Buffer){
                          var assert = require('assert')
                          var scripts = require('./scripts')
                          
                          
                          Severity: Major
                          Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 7 hrs to fix

                            Function 34 has 192 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            },{"./types":42,"assert":44,"bigi":3,"buffer":46}],34:[function(require,module,exports){
                            (function (Buffer){
                            var assert = require('assert')
                            var base58check = require('bs58check')
                            var crypto = require('./crypto')
                            Severity: Major
                            Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 7 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language