Showing 66 of 322 total issues
File tests.js
has 544 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Copyright 2014-2015 Yahoo! Inc.
// Copyrights licensed under the Mit License. See the accompanying LICENSE file for terms.
var PNG = require('pngjs').PNG;
var PNGImage = require('../index');
- Create a ticketCreate a ticket
File sizes.js
has 543 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Copyright 2015 Yahoo! Inc.
// Copyrights licensed under the Mit License. See the accompanying LICENSE file for terms.
var testGen = require('../testGen');
- Create a ticketCreate a ticket
File gamma.js
has 443 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Copyright 2015 Yahoo! Inc.
// Copyrights licensed under the Mit License. See the accompanying LICENSE file for terms.
var testGen = require('../../testGen');
var expect = require('chai').expect;
- Create a ticketCreate a ticket
exports
has 47 functions (exceeds 20 allowed). Consider refactoring. Open
module.exports = {
/**
* Gets the sequence
*
- Create a ticketCreate a ticket
File IHDR.js
has 331 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Copyright 2015 Yahoo! Inc.
// Copyrights licensed under the Mit License. See the accompanying LICENSE file for terms.
// IHDR - Image header
- Create a ticketCreate a ticket
Function addDecodeTests
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
addDecodeTests: function (options) {
before(function () {
this.file = this.resource(options.resourceGroup, options.resourceFile + '.png');
});
- Create a ticketCreate a ticket
Function decode
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
decode: function (image, strict, options) {
var i, len, index,
r, g, b, alpha,
headerChunk,
- Read upRead up
- Create a ticketCreate a ticket
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 encodeData
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
encodeData: function (image, options) {
if (options.chromaticities) {
var chunk = this.createChunk(this.getType(), this.getChunks());
- Read upRead up
- Create a ticketCreate a ticket
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 parse
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
parse: function (stream, length, strict, options) {
var maxWidth, maxHeight, maxDim, maxSize;
// Validation
- Read upRead up
- Create a ticketCreate a ticket
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 parse
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
parse: function (stream, length, strict, options) {
var headerChunk,
paletteChunk,
colorType,
- Create a ticketCreate a ticket
Function parse
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
parse: function (stream, length, strict, options) {
var headerChunk,
paletteChunk,
color,
- Read upRead up
- Create a ticketCreate a ticket
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
exports
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
module.exports = {
/**
* Gets the sequence
*
- Create a ticketCreate a ticket
Function parse
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
parse: function (stream, length, strict, options) {
var headerChunk,
paletteChunk,
colorType,
- Read upRead up
- Create a ticketCreate a ticket
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
File interlace.js
has 253 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Copyright 2015 Yahoo! Inc.
// Copyrights licensed under the Mit License. See the accompanying LICENSE file for terms.
var testGen = require('../testGen');
- Create a ticketCreate a ticket
File basic.js
has 253 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Copyright 2015 Yahoo! Inc.
// Copyrights licensed under the Mit License. See the accompanying LICENSE file for terms.
var testGen = require('../testGen');
- Create a ticketCreate a ticket
Function decode
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Decoder.prototype.decode = function (buffer, options) {
options = options || {};
var i, len,
- Create a ticketCreate a ticket
Function getBlurPixelAtIndex
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
getBlurPixelAtIndex: function (idx, funcName) {
var colors = 0,
colorCounter = 0,
fn,
- Create a ticketCreate a ticket
Function parse
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
parse: function (stream, length, strict, options) {
var maxWidth, maxHeight, maxDim, maxSize;
// Validation
- Create a ticketCreate a ticket
Function parse
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
parse: function (stream, length, strict, options) {
var headerChunk,
paletteChunk,
color,
- Create a ticketCreate a ticket
Function _determineWriter
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Normalizer.prototype._determineWriter = function () {
var headerChunk = this.getHeaderChunk(),
isColor, hasAlpha, isIndexed,
result = null;
- Read upRead up
- Create a ticketCreate a ticket
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"