Showing 143 of 340 total issues
Consider simplifying this complex logical expression. Open
Open
if i.has_attr('u1') and i.has_attr('u2') and i.has_attr('k'):
#print( i['u1'] + ":" + i['u2'] + ":" + i['k'] )
if "," in i['u1'] and len( i['u1'] ) > 1:
char_1 = i['u1'].split( ',' )
Function init
has 41 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 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(900, 220, 1);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function init
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(480, 480, 2);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
stage.x = 50;
Function init
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(300, 1800, 1);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function ligatureSwap
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
protected ligatureSwap(char: Character, ligTarget: string) {
let advanceBy = 0;
const firstChar = ligTarget.charAt(0);
const firstLigature = char._font.ligatures[firstChar];
//1 char match
- 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 addDebugLayout
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private addDebugLayout() {
let s = new createjs.Shape();
s.graphics.beginStroke("#FF0000");
s.graphics.setStrokeStyle(0.1);
s.graphics.decodeSVGPath(this.path);
Function init
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(850, 500, 1);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function layout
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
layout() {
this.addAccessibility();
this.overset = false;
this.oversetIndex = null;
this.removeAllChildren();
Function init
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(600, 220, 2);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
stage.scaleX = stage.scaleY = 4;
Function init
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(520, 320, 1);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function init
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(520, 320, 1);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function init
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(900, 500, 2);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function layout
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
layout() {
this.addAccessibility();
this.overset = false;
this.measured = 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 init
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(610, 610, 2);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function init
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(610, 610, 2);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function init
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(300, 1800, 1);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function init
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function init() {
const canvas = createHiDPICanvas(610, 610, 2);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
Function addDebugLayout
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private addDebugLayout() {
const font: Font = FontLoader.getFont(this.font);
//outline
let s = new createjs.Shape();
s.graphics.beginStroke("#FF0000");
Function addDebugLayout
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private addDebugLayout() {
const font: Font = FontLoader.getFont(this.font);
//outline
let s = new createjs.Shape();
s.graphics.beginStroke("#FF0000");