Showing 143 of 340 total issues
Function init
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(1000, 500, 1);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function init
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(1000, 500, 1);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function constructor
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(
x1: number[],
rx: number,
ry: number,
phiarg: number,
File SVGPath.ts
has 270 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export function parsePathData(data) {
if (!data) {
return [];
}
let cs = data;
Function lineLayout
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
lineLayout() {
// loop over lines
// place into text
let measuredHeight = 0;
let line;
Function lineLayout
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
lineLayout() {
// loop over lines
// place into text
let measuredHeight = 0;
let line;
Function init
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(350, 220, 2);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function init
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(350, 220, 2);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function lineLayout
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
Open
lineLayout() {
// loop over lines
// place into text
let measuredHeight = 0;
let line;
- 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 main.py
has 257 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
#!/usr/bin/python
# -*- coding: latin-1 -*-
import os
import shutil
Function init
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(1000, 1000, 2);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function layout
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
layout() {
this.addAccessibility();
this.overset = false;
this.measured = false;
Function init
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(910, 700, 2);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function createDemo
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function createDemo(exampleElement) {
const canvas = createHiDPICanvas(500, 300, 2);
canvas.style.maxWidth = "100%";
exampleElement.appendChild(canvas);
stage = new createjs.Stage(canvas);
Function init
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(420, 420, 2);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function init
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(1080, 420, 1);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function init
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(500, 500, 2);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function constructor
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
constructor(character: string, style: {}, index: number = null) {
super();
this.set(style);
this.index = 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"
Further reading
Function init
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(500, 350, 1);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function init
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(420, 420, 2);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);