Showing 266 of 572 total issues
Function buildConfig
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
var buildConfig = function(env) {
var isProd = env.prod;
var config = {
watch: !isProd,
Function initBuffers
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initBuffers() {
// Create a buffer for the cube's vertices.
cubeVerticesBuffer = gl.createBuffer();
Function render
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public render(state: IVisualStateItem, stateId: number): Element {
const liHolder = document.createElement("li");
if (state.active) {
liHolder.className = "active";
setTimeout(() => {
- 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 composeInContainer
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public composeInContainer(parentContainer: Element, indexInContainer: number, lastOperation: LastOperation): Element {
if (lastOperation === LastOperation.Delete) {
this.removeNode();
return 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 readFrameBufferFromContext
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected readFrameBufferFromContext(): any {
const frameBuffer = this.context.getParameter(WebGlConstants.FRAMEBUFFER_BINDING.value);
if (!frameBuffer) {
return 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 render
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public render(state: ISourceCodeState, stateId: number): Element {
const source = state.fragment ? state.sourceFragment : state.sourceVertex;
let originalShader: string;
let preprocessed = state.preprocessed;
Function initBuffers
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initBuffers() {
// Create a buffer for the cube's vertices.
cubeVerticesBuffer = gl.createBuffer();
Function initBuffers
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initBuffers() {
// Create a buffer for the cube's vertices.
cubeVerticesBuffer = gl.createBuffer();
Function initBuffers
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initBuffers() {
// Create a buffer for the cube's vertices.
cubeVerticesBuffer = gl.createBuffer();
Function initBuffers
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initBuffers() {
// Create a buffer for the cube's vertices.
cubeVerticesBuffer = gl.createBuffer();
Function initBuffers
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initBuffers() {
// Create a buffer for the cube's vertices.
cubeVerticesBuffer = gl.createBuffer();
Function initBuffers
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initBuffers() {
// Create a buffer for the cube's vertices.
cubeVerticesBuffer = gl.createBuffer();
Function initBuffers
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initBuffers() {
// Create a buffer for the cube's vertices.
cubeVerticesBuffer = gl.createBuffer();
Function initBuffers
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initBuffers() {
// Create a buffer for the cube's vertices.
cubeVerticesBuffer = gl.createBuffer();
Function initBuffers
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initBuffers() {
// Create a buffer for the cube's vertices.
cubeVerticesBuffer = gl.createBuffer();
Function initBuffers
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initBuffers() {
// Create a buffer for the cube's vertices.
cubeVerticesBuffer = gl.createBuffer();
Function initBuffers
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initBuffers() {
// Create a buffer for the cube's vertices.
cubeVerticesBuffer = gl.createBuffer();
BaseState
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
export abstract class BaseState {
public abstract get stateName(): string;
protected readonly context: WebGLRenderingContexts;
protected readonly contextVersion: number;
File visualState.ts
has 263 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { BaseState } from "../baseState";
import { WebGlConstants, WebGlConstantsByValue, WebGlConstantsByName, WebGlConstant } from "../../types/webglConstants";
import { ReadPixelsHelper } from "../../utils/readPixelsHelper";
import { ICommandCapture } from "../../../shared/capture/commandCapture";
import { drawCommands } from "../../utils/drawCommands";
Function createCommands
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private createCommands(capture: ICapture): void {
this.mvx.removeChildrenStates(this.commandListStateId);
let tempVisualStateId = this.initVisualStateId;
let visualStateSet = 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"