Showing 24 of 59 total issues
Function VM
has a Cognitive Complexity of 257 (exceeds 5 allowed). Consider refactoring. Open
MVM.VM = function(glctx, manager, codeStore, debugMode) {
/*
* Struct layouts
*
- 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 VM
has 576 lines of code (exceeds 25 allowed). Consider refactoring. Open
MVM.VM = function(glctx, manager, codeStore, debugMode) {
/*
* Struct layouts
*
Function interpret
has 524 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.interpret = function() {
if(this.dead === true){
return;
}
File MVM.js
has 629 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Sketch Virtual Machine
* Darren Findlay
*
* 15th January 2015
Function SketchGen
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
Sketch.SketchGen = function(){
var outBuffer = [];
var programCounter = 0;
var scopeStack = [];
var stackPtr = 0;
- 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 SketchGen
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
Sketch.SketchGen = function(){
var outBuffer = [];
var programCounter = 0;
var scopeStack = [];
var stackPtr = 0;
File SketchGenInstr.js
has 305 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* global Sketch */
/* global MVM */
//HELPERS
var createNode = function(type, args){
Function fetchSetter
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Palette.Program.fetchSetter = function(gl, type){
//LAZY
//I'LL DO THIS MORE ELEGANTLY ONE DAY.
var oneParamFromArray = function(convertFunc){
return function(ptr, array){
Function restoreDefaultConfig
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
restoreDefaultConfig: function(mode){
var attrPointer;
var shaderPointer;
for(var j=0; j<2; j++){
- 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 setConfig
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
setConfig: function(mode, conf){
var attrPointer;
var shaderPointer;
for(var j=0; j<2; j++){
- 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 compile
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
compile: function(text){
if(this.readyLock>0){
alert("Sketch driver is still loading shaders - be patient!" +
" If it's been excessively long then you may have tried to add a malformed shader.");
return false;
Function passAttrstoProg
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
passAttrstoProg: function(){
var attrPointer;
for(var j=0; j<2; j++){
if(!j){attrPointer = this.attrs.vs;}
- 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 prepareAttrStores
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
prepareAttrStores: function(){
this.context.useProgram(this.program);
var shaderPointer;
var attrPointer;
- 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 draw
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
draw: function(verts, conf1, conf2){
this.context.useProgram(this.program);
if(!conf1) conf1 = {};
var tempDrawMode = this.drawMode;
if(verts !== null){
Function draw
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
draw: function(verts, conf1, conf2){
this.context.useProgram(this.program);
if(!conf1) conf1 = {};
var tempDrawMode = this.drawMode;
if(verts !== null){
- 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 lookup
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
lookup: function(operand, keys){
try{
var k = this.store[operand];
for(var i = 0; i< keys.length; i++){
- 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 lookup
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
lookup: function(operand, keys){
try{
var k = this.store[operand];
for(var i = 0; i< keys.length; i++){
Function prepareAttrStores
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
prepareAttrStores: function(){
this.context.useProgram(this.program);
var shaderPointer;
var attrPointer;
Function getProgram
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
getProgram: function(vs, fs){
var vsName = this.getShaderName(vs);
var fsName = this.getShaderName(fs);
var vsObj;
var fsObj;
- 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 compile
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
compile: function(text){
if(this.readyLock>0){
alert("Sketch driver is still loading shaders - be patient!" +
" If it's been excessively long then you may have tried to add a malformed shader.");
return false;
- 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"