Showing 511 of 903 total issues
Function 37
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],37:[function(require,module,exports){
module.exports = {
// push value
OP_FALSE : 0,
OP_0 : 0,
Function StealthService
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function StealthService(core) {
var self = this;
this.name = 'stealth';
// Worker for processing stealth
Function 22
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"./core":3,"./hmac":8,"./sha1":26}],22:[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"));
Function 36
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"./bufferutils":28,"./crypto":29,"./ecdsa":30,"./ecpubkey":32,"./ecsignature":33,"./networks":36,"bigi":3,"buffer":46,"ecurve":24}],36:[function(require,module,exports){
// https://en.bitcoin.it/wiki/List_of_address_prefixes
// Dogecoin BIP32 is a proposed standard: https://bitcointalk.org/index.php?topic=409731
var networks = {
Function findFinderPattern
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.findFinderPattern = function(image){
var tryHarder = false;
this.image=image;
var maxI = qrcode.height;
var maxJ = qrcode.width;
Function link
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function(scope, element, attrs) {
var iconSize = scope.iconSize || 32;
var canvasSize = iconSize > 32 ? 64 : 32;
var canvas = $window.document.createElement('canvas');
Function 18
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"util":68}],18:[function(require,module,exports){
/**
* A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
* in FIPS 180-2
Function exports
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (Buffer, Hash) {
var K = [
0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,
0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,
Function 30
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"crypto":10}],30:[function(require,module,exports){
(function (Buffer){
var assert = require('assert')
var crypto = require('./crypto')
var enforceType = require('./types')
Function _update
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Sha512.prototype._update = function(M) {
var W = this._w
var a, b, c, d, e, f, g, h
var al, bl, cl, dl, el, fl, gl, hl
Function 38
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],38:[function(require,module,exports){
(function (Buffer){
var assert = require('assert')
var bufferutils = require('./bufferutils')
var crypto = require('./crypto')
Function getMiddleBrightnessPerArea
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
Open
qrcode.getMiddleBrightnessPerArea=function(image)
{
var numSqrtArea = 4;
//obtain middle brightness((min + max) / 2) per area
var areaWidth = Math.floor(qrcode.width / numSqrtArea);
- Read upRead up
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 Upgrade4To5
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Upgrade4To5(store, identity, password) {
if (identity.store.get('old-mpk')) {
console.log("Double reseed?");
return false;
}
Function _doProcessBlock
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_doProcessBlock: function (M, offset) {
// Swap endian
for (var i = 0; i < 16; i++) {
// Shortcuts
var offset_i = offset + i;
Function receiveMessage
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
multiParty.receiveMessage = function(sender, myName, message) {
try {
message = JSON.parse(message);
}
catch(err) {
Function queue
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async.queue = function (worker, concurrency) {
if (concurrency === undefined) {
concurrency = 1;
}
function _insert(q, data, pos, callback) {
Function callPlugin
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
callPlugin: function () {
var map = this.map,
id = map.id,
//Map already normalized the prefix.
pluginMap = makeModuleMap(map.prefix);
Function TzDate
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
angular.mock.TzDate = function (offset, timestamp) {
var self = new Date(0);
if (angular.isString(timestamp)) {
var tsStr = timestamp;
Function 47
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"base64-js":47,"ieee754":48,"is-array":49}],47:[function(require,module,exports){
var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
;(function (exports) {
'use strict';
Function 33
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"./address":27,"./crypto":29,"./ecdsa":30,"./networks":36,"./types":42,"buffer":46,"ecurve":24}],33:[function(require,module,exports){
(function (Buffer){
var assert = require('assert')
var enforceType = require('./types')