Showing 143 of 340 total issues
Function filter_fonts
has a Cognitive Complexity of 588 (exceeds 5 allowed). Consider refactoring. Open
def filter_fonts():
files = glob.glob( OUT_PATH + os.sep + '*.txt' )
#target = 8
#target_count = 0
font_id = ""
- 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 svg_to_txt
has a Cognitive Complexity of 194 (exceeds 5 allowed). Consider refactoring. Open
def svg_to_txt():
files = glob.glob( SVG_PATH + os.sep + '*.svg' )
#target = 8
#target_count = 0
font_id = ""
- 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 getPathPoint
has a Cognitive Complexity of 143 (exceeds 5 allowed). Consider refactoring. Open
getPathPoint(
distance: number,
characterLength = 0,
charOffset = 0
): PathPoint {
- 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 characterLayout
has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring. Open
characterLayout(): boolean {
//char layout
const len = this.text.length;
let char: Character;
const defaultStyle: Style = {
- 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 characterLayout
has a Cognitive Complexity of 87 (exceeds 5 allowed). Consider refactoring. Open
characterLayout(): boolean {
//char layout
let len = this.text.length;
let char: Character;
const defaultStyle: Style = {
- 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 loadFont
has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring. Open
static loadFont(fontName: string, loader: any) {
//determine if font exists in memory
if (FontLoader.fonts.hasOwnProperty(fontName)) {
//loading complete
if (FontLoader.fonts[fontName].loaded === true) {
- 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 parsePathData
has 268 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function parsePathData(data) {
if (!data) {
return [];
}
let cs = data;
Function wordLayout
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
wordLayout() {
// loop over words
// place into lines
const len = this.words.length;
let currentLine = new 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
Function getPathPoint
has 224 lines of code (exceeds 25 allowed). Consider refactoring. Open
getPathPoint(
distance: number,
characterLength = 0,
charOffset = 0
): PathPoint {
Function update
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
update() {
this.pathElement = document.createElementNS(
"http://www.w3.org/2000/svg",
"path"
) as SVGPathElement;
- 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 209 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function init() {
const canvas = createHiDPICanvas(1000, 1000, 2);
document.body.appendChild(canvas);
const stage = new createjs.Stage(canvas);
File invalid.py
has 512 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/python
# -*- coding: latin-1 -*-
import os
import shutil
Function parsePathData
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
export function parsePathData(data) {
if (!data) {
return [];
}
let cs = data;
- 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 CharacterText.ts
has 507 lines of code (exceeds 250 allowed). Consider refactoring. Open
import TextContainer from "./TextContainer";
import Align from "./Align";
import FontLoader from "./FontLoader";
import { ConstructObj, Style } from "./Interfaces";
import Font from "./Font";
File vertical.py
has 505 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/python
# -*- coding: utf8 -*-
VERTICAL_OFFSET = {}
VERTICAL_OFFSET[ 'amadeo_bold' ] = {}
Function characterLayout
has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring. Open
characterLayout(): boolean {
//characterlayout adds Charcters to words and measures true height. LineHeight is not a factor til Line layout.
//char layout
const len = this.text.length;
- 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 characterLayout
has 199 lines of code (exceeds 25 allowed). Consider refactoring. Open
characterLayout(): boolean {
//char layout
let len = this.text.length;
let char: Character;
const defaultStyle: Style = {
File PathText.ts
has 491 lines of code (exceeds 250 allowed). Consider refactoring. Open
import TextContainer from "./TextContainer";
import { ConstructObj, Style } from "./Interfaces";
import Path, { PathFit, PathAlign } from "./Path";
import VerticalAlign from "./VerticalAlign";
import FontLoader from "./FontLoader";
Function characterLayout
has 192 lines of code (exceeds 25 allowed). Consider refactoring. Open
characterLayout(): boolean {
//char layout
const len = this.text.length;
let char: Character;
const defaultStyle: Style = {
File characters.py
has 441 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/python
# -*- coding: utf8 -*-
#unicodeRange="U+0020-U+007E,U+00A1-U+00FF,U+2010-U+2036"