Showing 266 of 572 total issues
Function loadFiles
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private loadFiles(event: DragEvent): void {
let filesToLoad: any = null;
// Handling data transfer via drag'n'drop
if (event && event.dataTransfer && event.dataTransfer.files) {
- 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 areStatesEquals
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected areStatesEquals(a: any, b: any): boolean {
if (typeof a !== typeof b) {
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"
Further reading
Function displayCurrentCommandDetail
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
private displayCurrentCommandDetail(commandState: ICommandListItemState): number {
const command = commandState.capture;
this.mvx.removeChildrenStates(this.commandDetailStateId);
const visualState = this.mvx.getGenericState<any>(commandState.visualStateId);
Function readFrameBufferAttachmentFromContext
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected readFrameBufferAttachmentFromContext(attachment: number): any {
const target = WebGlConstants.FRAMEBUFFER.value;
const type = this.context.getFramebufferAttachmentParameter(target, attachment, WebGlConstants.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE.value);
if (type === WebGlConstants.NONE.value) {
return undefined;
Function createScene
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
var createScene = function (engine, canvas) {
var scene = new BABYLON.Scene(engine);
// Setup camera
var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
Function createScene
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
var createScene = function (engine, canvas) {
var scene = new BABYLON.Scene(engine);
// Setup camera
var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
Function createScene
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
var createScene = function (engine, canvas) {
var scene = new BABYLON.Scene(engine);
// Setup camera
var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
Function createScene
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
var createScene = function (engine, canvas) {
var scene = new BABYLON.Scene(engine);
// Setup camera
var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
Function createScene
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
var createScene = function (engine, canvas) {
var scene = new BABYLON.Scene(engine);
// Setup camera
var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
Function readTextureFromContext
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected readTextureFromContext(textureUnit: number, target: WebGlConstant): {} {
const activeTexture = this.context.getParameter(WebGlConstants.ACTIVE_TEXTURE.value);
this.context.activeTexture(WebGlConstants.TEXTURE0.value + textureUnit);
const textureState: any = {
Function render
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public render(state: IVisualStateItem, stateId: number): Element {
const liHolder = document.createElement("li");
if (state.active) {
liHolder.className = "active";
setTimeout(() => {
Function appendToAnalysis
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected appendToAnalysis(capture: ICapture, analysis: IAnalysis): void {
if (!capture.commands) {
return;
}
Function constructor
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(options: IContextInformation) {
super(options);
this.extensionDefinition = [
[{ name: "ANGLE_instanced_arrays", description: "" },
Function createCapture
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public createCapture(functionInformation: IFunctionInformation, commandCaptureId: number, marker: string): ICommandCapture {
// Removes the spector internal calls to leave only th relevant part.
const stackTrace = StackTrace.getStackTrace(4, 1);
// Includes uniform functions special cases to prevent lots of inheritence.
Function loadFiles
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
var loadFiles = function(event) {
var filesToLoad = null;
// Handling data transfer via drag'n'drop
if (event && event.dataTransfer && event.dataTransfer.files) {
- 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 readFrameBufferAttachmentFromTexture
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
protected readFrameBufferAttachmentFromTexture(gl: WebGLRenderingContext | WebGL2RenderingContext,
frameBuffer: WebGLFramebuffer, webglConstant: WebGlConstant,
x: number, y: number, width: number, height: number,
target: number, componentType: number, storage: any): void {
let textureLayer = 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 storeCommandIds
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
protected storeCommandIds(): void {
const commandIdsStates = ["unusedCommandIds", "disabledCommandIds", "redundantCommandIds", "validCommandIds"];
for (const commandIdsStatus of commandIdsStates) {
this.currentState[commandIdsStatus] = [] as any;
}
- 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 createCapture
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public createCapture(functionInformation: IFunctionInformation, commandCaptureId: number, marker: string): ICommandCapture {
// Removes the spector internal calls to leave only th relevant part.
const stackTrace = StackTrace.getStackTrace(4, 1);
// Includes uniform functions special cases to prevent lots of inheritence.
- 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 stringifyParameterValue
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
protected stringifyParameterValue(value: any, parameter: IParameter): any {
if (value === null) {
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 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected readFrameBufferFromContext(): any {
const frameBuffer = this.context.getParameter(WebGlConstants.FRAMEBUFFER_BINDING.value);
if (!frameBuffer) {
return null;
}