Showing 41 of 90 total issues
Function mix
has a Cognitive Complexity of 143 (exceeds 5 allowed). Consider refactoring. Open
Protracker.prototype.mix = function(ape) {
var f;
var p, pp, n, nn;
var mod;
if (ape.srcElement) {
- 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
File index.js
has 785 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
amiga protracker module player for web audio api
(c) 2012-2014 firehawk/tda (firehawk@haxor.fi)
originally hacked together in a weekend, so please excuse
Function exports
has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(Protracker){
Protracker.prototype.parseIT = function()
{
console.log('Parse IMPULSE TRACKER file');
console.log('unfinished');
- 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 exports
has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(Protracker){
Protracker.prototype.parseXM = function()
{
console.log('Parse FT2 file');
console.log('unfinished');
- 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 exports
has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(Protracker){
Protracker.prototype.parseMOD = function()
{
var i,j;
this.vu=[];
- 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 parse
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
Protracker.prototype.parse = function()
{
var i,j,c;
if (!this.buffer){
- 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 exports
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(Protracker){
Protracker.prototype.parseIT = function()
{
console.log('Parse IMPULSE TRACKER file');
console.log('unfinished');
Function parseIT
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
Protracker.prototype.parseIT = function()
{
console.log('Parse IMPULSE TRACKER file');
console.log('unfinished');
var i,j,d;
Function exports
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(Protracker){
Protracker.prototype.parseXM = function()
{
console.log('Parse FT2 file');
console.log('unfinished');
Function parseXM
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
Protracker.prototype.parseXM = function()
{
console.log('Parse FT2 file');
console.log('unfinished');
this.stop();
Function mix
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Protracker.prototype.mix = function(ape) {
var f;
var p, pp, n, nn;
var mod;
if (ape.srcElement) {
Function advance
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
Protracker.prototype.advance=function(mod) {
var spd=(((mod.samplerate*60)/mod.bpm)/4)/6;
// advance player
if (mod.offset>spd) { mod.tick++; mod.offset=0; mod.flags|=1; }
- 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 parse
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
Protracker.prototype.parse = function()
{
var i,j,c;
if (!this.buffer){
Function exports
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(Protracker){
Protracker.prototype.parseMOD = function()
{
var i,j;
this.vu=[];
Function parseMOD
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Protracker.prototype.parseMOD = function()
{
var i,j;
this.vu=[];
for(i=0;i<this.channels;i++) this.vu[i]=0.0;
Function Protracker
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Protracker()
{
var i, t;
this.initialize();
Function advance
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Protracker.prototype.advance=function(mod) {
var spd=(((mod.samplerate*60)/mod.bpm)/4)/6;
// advance player
if (mod.offset>spd) { mod.tick++; mod.offset=0; mod.flags|=1; }
Function initialize
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Protracker.prototype.initialize = function()
{
this.syncqueue=[];
this.tick=0;
Function Protracker
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function Protracker()
{
var i, t;
this.initialize();
- 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 createContext
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Protracker.prototype.createContext = function()
{
if ( typeof AudioContext !== 'undefined') {
this.context = new AudioContext();
} else {