darkwallet/darkwallet

View on GitHub

Showing 511 of 903 total issues

Function 12 has 85 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

    Function 17 has 84 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{"./hash":15,"./sha1":17,"./sha256":18,"./sha512":19,"buffer":46}],17:[function(require,module,exports){
    /*
     * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
     * in FIPS PUB 180-1
     * Version 2.1a Copyright Paul Johnston 2000 - 2002.
    Severity: Major
    Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 3 hrs to fix

      Function 26 has 84 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Function makeRequire has 84 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    makeRequire: function (relMap, options) {
                        options = options || {};
        
                        function localRequire(deps, callback, errback) {
                            var id, map, requireMod;
        Severity: Major
        Found in src/vendors/requirejs/require.js - About 3 hrs to fix

          Function spendBitcoins has 82 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            $scope.spendBitcoins = function(spend) {
                var hasPaymentCodes = false;
                var recipients = spend.recipients;
                var contacts = spend.contacts;
                var totalAmount = spend.amount;
          Severity: Major
          Found in src/js/frontend/controllers/send.js - About 3 hrs to fix

            Function core_md5 has 82 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function core_md5(x, len)
            {
              /* append padding */
              x[len >> 5] |= 0x80 << ((len) % 32);
              x[(((len + 64) >>> 9) << 4) + 14] = len;
            Severity: Major
            Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 3 hrs to fix

              Function BitMatrix has 81 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function BitMatrix( width,  height)
              {
                  if(!height)
                      height=width;
                  if (width < 1 || height < 1)
              Severity: Major
              Found in src/vendors/jsqrcode/jsqrcode.js - About 3 hrs to fix

                Function exports has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                module.exports = function (Buffer, Hash) {
                
                  var A = 0|0
                  var B = 4|0
                  var C = 8|0
                Severity: Major
                Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 3 hrs to fix

                  Function GF256 has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function GF256( primitive)
                  {
                      this.expTable = new Array(256);
                      this.logTable = new Array(256);
                      var x = 1;
                  Severity: Major
                  Found in src/vendors/jsqrcode/jsqrcode.js - About 3 hrs to fix

                    Function bnModPow has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function bnModPow(e, m) {
                      var i = e.bitLength(),
                        k, r = nbv(1),
                        z
                      if (i <= 0) return r
                    Severity: Major
                    Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 3 hrs to fix

                      Function formatValue has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function formatValue(ctx, value, recurseTimes) {
                        // Provide a hook for user-specified inspect functions.
                        // Check that value is an object with an inspect function on it
                        if (ctx.customInspect &&
                            value &&
                      Severity: Major
                      Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 3 hrs to fix

                        Function checkAndNudgePoints has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                        Open

                        GridSampler.checkAndNudgePoints=function( image,  points)
                                {
                                    var width = qrcode.width;
                                    var height = qrcode.height;
                                    // Check and nudge points from start until we see some that are OK:
                        Severity: Minor
                        Found in src/vendors/jsqrcode/jsqrcode.js - About 3 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 process has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                        Open

                        qrcode.process = function(ctx){
                            
                            var start = new Date().getTime();
                        
                            var image = qrcode.grayScaleToBitmap(qrcode.grayscale());
                        Severity: Minor
                        Found in src/vendors/jsqrcode/jsqrcode.js - About 3 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 _doProcessBlock has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                    _doProcessBlock: function (M, offset) {
                                        // Shortcuts
                                        var state = this._state;
                                        var nBlockSizeLanes = this.blockSize / 2;
                        
                        
                        Severity: Major
                        Found in src/vendors/crypto-js/cryptojs.js - About 3 hrs to fix

                          File multiParty.js has 294 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          'use strict';
                          
                          define(['bitcoinjs-lib', 'util/djbec', 'crypto-js'], function(Bitcoin, Curve25519, CryptoJS) {
                          
                          var BigInteger = Bitcoin.BigInteger;
                          Severity: Minor
                          Found in src/js/util/multiParty.js - About 3 hrs to fix

                            Function 24 has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            },{"./cipher-core":2,"./core":3,"./enc-base64":4,"./evpkdf":6,"./md5":10}],24:[function(require,module,exports){
                            ;(function (root, factory, undef) {
                                if (typeof exports === "object") {
                                    // CommonJS
                                    module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core"));
                            Severity: Major
                            Found in src/vendors/crypto-js/cryptojs.js - About 2 hrs to fix

                              Function 48 has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              },{}],48:[function(require,module,exports){
                              exports.read = function(buffer, offset, isLE, mLen, nBytes) {
                                var e, m,
                                    eLen = nBytes * 8 - mLen - 1,
                                    eMax = (1 << eLen) - 1,
                              Severity: Major
                              Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 2 hrs to fix

                                Function GF256 has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function GF256( primitive)
                                {
                                    this.expTable = new Array(256);
                                    this.logTable = new Array(256);
                                    var x = 1;
                                Severity: Minor
                                Found in src/vendors/jsqrcode/jsqrcode.js - About 2 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 auto has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    async.auto = function (tasks, callback) {
                                        callback = callback || function () {};
                                        var keys = _keys(tasks);
                                        var remainingTasks = keys.length
                                        if (!remainingTasks) {
                                Severity: Major
                                Found in src/vendors/async/lib/async.js - About 2 hrs to fix

                                  Function find has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      this.find = function()
                                      {
                                              var startX = this.startX;
                                              var height = this.height;
                                              var maxJ = startX + width;
                                  Severity: Major
                                  Found in src/vendors/jsqrcode/jsqrcode.js - About 2 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language