Showing 266 of 572 total issues
Function ./OBJ/objFileLoader.ts
has 488 lines of code (exceeds 25 allowed). Consider refactoring. Open
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OBJFileLoader", function() { return OBJFileLoader; });
Function OBJFileLoader
has 483 lines of code (exceeds 25 allowed). Consider refactoring. Open
var OBJFileLoader = /** @class */ (function () {
/**
* Creates loader for .OBJ files
*
* @param meshLoadOptions options for loading and parsing OBJ/MTL files.
Function _parseSolid
has 381 lines of code (exceeds 25 allowed). Consider refactoring. Open
OBJFileLoader.prototype._parseSolid = function (meshesNames, scene, data, rootUrl) {
var _this = this;
var positions = []; //values for the positions of vertices
var normals = []; //Values for the normals
var uvs = []; //Values for the textures
File webglConstants.ts
has 716 lines of code (exceeds 250 allowed). Consider refactoring. Open
// tslint:disable:max-file-line-count
// tslint:disable:interface-name
// tslint:disable:max-line-length
// tslint:disable:variable-name
File resultView.ts
has 708 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Import application Styles.
import "../styles/resultView.scss";
import { Observable } from "../../shared/utils/observable";
import { ICapture } from "../../shared/capture/capture";
File babylon.objFileLoader.js
has 644 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("babylonjs"));
else if(typeof define === 'function' && define.amd)
define("babylonjs-loaders", ["babylonjs"], factory);
File contentScript.js
has 514 lines of code (exceeds 250 allowed). Consider refactoring. Open
var debug = false;
//_______________________________EXTENSION POLYFILL_____________________________________
window.browser = (function () {
return window.msBrowser ||
File ace-ext-searchbox.js
has 482 lines of code (exceeds 250 allowed). Consider refactoring. Open
ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"], function(require, exports, module) {
"use strict";
var dom = require("../lib/dom");
var lang = require("../lib/lang");
File ace-mode-glsl.js
has 478 lines of code (exceeds 250 allowed). Consider refactoring. Open
ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
File drawCallState.ts
has 456 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { BaseState } from "../baseState";
import { WebGlConstants, WebGlConstantsByName, WebGlConstant, WebGlConstantsByValue } from "../../types/webglConstants";
import { DrawCallTextureInputState } from "./drawCallTextureInputState";
import { DrawCallUboInputState } from "./drawCallUboInputState";
import { ProgramRecompilerHelper } from "../../utils/programRecompilerHelper";
File spector.ts
has 450 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { WebGLRenderingContexts, IContextInformation } from "./backend/types/contextInformation";
import { ICapture } from "./shared/capture/capture";
import { ProgramRecompilerHelper } from "./backend/utils/programRecompilerHelper";
Function c_cppHighlightRules
has 168 lines of code (exceeds 25 allowed). Consider refactoring. Open
var c_cppHighlightRules = function() {
var keywordControls = (
"break|case|continue|default|do|else|for|goto|if|_Pragma|" +
"return|switch|while|catch|operator|try|throw|using"
Function getStackTrace
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
public static getStackTrace(removeFirstNCalls = 0, removeLastNCalls = 0): string[] {
const callstack: string[] = [];
try {
throw new Error("Errorator.");
- 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 compareGroups
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
private compareGroups(name: string, groupA: any, groupB: any): GroupComparisonResult {
// Prepare cache and result.
const processed: AlreadyProcessed = {};
const groupResult: GroupComparisonResult = {
name,
- 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
Spector
has 39 functions (exceeds 20 allowed). Consider refactoring. Open
export class Spector {
public static getFirstAvailable3dContext(canvas: HTMLCanvasElement | OffscreenCanvas): WebGLRenderingContexts {
// Custom detection to run in the extension.
return this.tryGetContextFromHelperField(canvas) ||
this.tryGetContextFromCanvas(canvas, "webgl") ||
Function readFromContext
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
protected readFromContext(): void {
const program = this.context.getParameter(WebGlConstants.CURRENT_PROGRAM.value);
if (!program) {
return;
}
- 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 analyse
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
protected analyse(consumeCommand: ICommandCapture): void {
for (const stateName in this.capturedCommandsByState) {
if (this.capturedCommandsByState.hasOwnProperty(stateName)) {
const commands = this.capturedCommandsByState[stateName];
const lengthM1 = commands.length - 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 ./OBJ/mtlFileLoader.ts
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MTLFileLoader", function() { return MTLFileLoader; });
Function MTLFileLoader
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
var MTLFileLoader = /** @class */ (function () {
function MTLFileLoader() {
/**
* All material loaded from the mtl will be set here
*/
Function _adaptComments
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
private _adaptComments(str: string): string {
let singleLineComment = false;
let multiLineComment = false;
for (let index = 0; index < str.length; index++) {
- 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"