darkwallet/darkwallet

View on GitHub

Showing 903 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

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

                function nextState() {
                    // Shortcuts
                    var X = this._X;
                    var C = this._C;
        
        
        Severity: Major
        Found in src/vendors/crypto-js/cryptojs.js and 1 other location - About 1 wk to fix
        src/vendors/crypto-js/cryptojs.js on lines 3846..3892

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

        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

                function nextState() {
                    // Shortcuts
                    var X = this._X;
                    var C = this._C;
        
        
        Severity: Major
        Found in src/vendors/crypto-js/cryptojs.js and 1 other location - About 1 wk to fix
        src/vendors/crypto-js/cryptojs.js on lines 3653..3699

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

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

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

                                  for (var i = 0; i < 80; i += 1) {
                                      t = (al +  M[offset+zl[i]])|0;
                                      if (i<16){
                                      t +=  f1(bl,cl,dl) + hl[0];
                                      } else if (i<32) {
                  Severity: Major
                  Found in src/vendors/crypto-js/cryptojs.js and 1 other location - About 3 days to fix
                  src/vendors/bitcoinjs-lib/bitcoinjs.js on lines 2264..2306

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

                  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

                    for (var i = 0; i < 80; i += 1) {
                      t = (al +  M[offset+zl[i]])|0;
                      if (i<16){
                          t +=  f1(bl,cl,dl) + hl[0];
                      } else if (i<32) {
                  Severity: Major
                  Found in src/vendors/bitcoinjs-lib/bitcoinjs.js and 1 other location - About 3 days to fix
                  src/vendors/crypto-js/cryptojs.js on lines 4155..4197

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

                  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

                  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
                              Severity
                              Category
                              Status
                              Source
                              Language