darkwallet/darkwallet

View on GitHub

Showing 511 of 903 total issues

File bitcoinjs.js has 6471 lines of code (exceeds 250 allowed). Consider refactoring.
Open

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.bitcoin=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
// (public) Constructor
function BigInteger(a, b, c) {
  if (!(this instanceof BigInteger))
    return new BigInteger(a, b, c)
Severity: Major
Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 2 wks to fix

    File cryptojs.js has 3574 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.CryptoJS=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[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 1 wk to fix

      File jsqrcode.js has 2913 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*
        Ported to JavaScript by Lazar Laszlo 2011 
        
        lazarsoft@gmail.com, www.lazarsoft.info
        
      Severity: Major
      Found in src/vendors/jsqrcode/jsqrcode.js - About 1 wk to fix

        Function 1 has 1186 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.bitcoin=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
        // (public) Constructor
        function BigInteger(a, b, c) {
          if (!(this instanceof BigInteger))
            return new BigInteger(a, b, c)
        Severity: Major
        Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 5 days to fix

          Function newContext has 934 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function newContext(contextName) {
                  var inCheckLoaded, Module, context, handlers,
                      checkLoadedTimeoutId,
                      config = {
                          //Defaults. Do not set a default for map
          Severity: Major
          Found in src/vendors/requirejs/require.js - About 4 days to fix

            Function FinderPatternFinder has a Cognitive Complexity of 222 (exceeds 5 allowed). Consider refactoring.
            Open

            function FinderPatternFinder()
            {
                this.image=null;
                this.possibleCenters = [];
                this.hasSkipped = false;
            Severity: Minor
            Found in src/vendors/jsqrcode/jsqrcode.js - About 4 days 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 46 has 839 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            },{}],46:[function(require,module,exports){
            /*!
             * The buffer module from node.js, for the browser.
             *
             * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
            Severity: Major
            Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 4 days to fix

              File fiat.js has 1392 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              'use strict';
              
              define(function() {
                // Available fiat currencies
                // Based on http://www.localeplanet.com/api/auto/currencymap.html
              Severity: Major
              Found in src/js/util/fiat.js - About 3 days to fix

                Function 32 has 676 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                },{"./core":3,"./x64-core":33}],32:[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 3 days to fix

                  File require.js has 1249 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /** vim: et:ts=4:sw=4:sts=4
                   * @license RequireJS 2.1.15 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
                   * Available via the MIT or new BSD license.
                   * see: http://github.com/jrburke/requirejs for details
                   */
                  Severity: Major
                  Found in src/vendors/requirejs/require.js - About 3 days to fix

                    File async.js has 937 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /*jshint onevar: false, indent:4 */
                    /*global setImmediate: false, setTimeout: false, console: false */
                    (function () {
                    
                        var async = {};
                    Severity: Major
                    Found in src/vendors/async/lib/async.js - About 2 days to fix

                      Function 68 has 431 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      },{}],68:[function(require,module,exports){
                      (function (process,global){
                      // Copyright Joyent, Inc. and other Node contributors.
                      //
                      // Permission is hereby granted, free of charge, to any person obtaining a
                      Severity: Major
                      Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 2 days to fix

                        Function FinderPatternFinder has 425 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function FinderPatternFinder()
                        {
                            this.image=null;
                            this.possibleCenters = [];
                            this.hasSkipped = false;
                        Severity: Major
                        Found in src/vendors/jsqrcode/jsqrcode.js - About 2 days to fix

                          File angular-mocks.js has 867 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /**
                           * @license AngularJS v1.2.26
                           * (c) 2010-2014 Google, Inc. http://angularjs.org
                           * License: MIT
                           */
                          Severity: Major
                          Found in src/vendors/angular-mocks/angular-mocks.js - About 2 days to fix

                            Function AlignmentPatternFinder has a Cognitive Complexity of 100 (exceeds 5 allowed). Consider refactoring.
                            Open

                            function AlignmentPatternFinder( image,  startX,  startY,  width,  height,  moduleSize,  resultPointCallback)
                            {
                                this.image = image;
                                this.possibleCenters = new Array();
                                this.startX = startX;
                            Severity: Minor
                            Found in src/vendors/jsqrcode/jsqrcode.js - About 2 days 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 WalletService has 364 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              function WalletService(core) {
                                var keyRing = new IdentityKeyRing();
                                var self = this;
                                this.name = 'wallet';
                                var heightTimeout;
                            Severity: Major
                            Found in src/js/backend/services/wallet.js - About 1 day to fix

                              Function BitMatrixParser has a Cognitive Complexity of 71 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function BitMatrixParser(bitMatrix)
                              {
                                  var dimension = bitMatrix.Dimension;
                                  if (dimension < 21 || (dimension & 0x03) != 1)
                                  {
                              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

                              Function 2 has 280 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              },{"./cipher-core":2,"./core":3,"./enc-base64":4,"./evpkdf":6,"./md5":10}],2:[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 1 day to fix

                                Function GF256Poly has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function GF256Poly(field,  coefficients)
                                {
                                    if (coefficients == null || coefficients.length == 0)
                                    {
                                        throw "System.ArgumentException";
                                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

                                Function QRCodeDataBlockReader has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function QRCodeDataBlockReader(blocks,  version,  numErrorCorrectionCode)
                                {
                                    this.blockPointer = 0;
                                    this.bitPointer = 7;
                                    this.dataLength = 0;
                                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

                                Severity
                                Category
                                Status
                                Source
                                Language