Showing 429 of 1,682 total issues
Function intersectPolygon
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function intersectPolygon(node, polyPoints, point) {
var x1 = node.x;
var y1 = node.y;
var intersections = [];
Function vertLabels
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function vertLabels(theGap, theTopPad) {
let prevGap = 0;
const numOccurrences = Object.keys(categoryHeights).map((d) => [d, categoryHeights[d]]);
Function intersectPolygon
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function intersectPolygon(node, polyPoints, point) {
let x1 = node.x;
let y1 = node.y;
let intersections = [];
Function question
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const question = async (parent: SVGAElement, node: Node): Promise<SVGAElement> => {
const { labelStyles, nodeStyles } = styles2String(node);
node.labelStyle = labelStyles;
const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));
Function draw
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const draw = function (text, id, _version, diagObj) {
conf = getConfig().er;
log.info('Drawing ER diagram');
const securityLevel = getConfig().securityLevel;
// Handle root and Document for when rendering in sandbox mode
Function addNotes
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addNotes = function (
notes: ClassNote[],
g: graphlib.Graph,
startEdgeId: number,
classes: ClassMap
Function setLogLevel
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const setLogLevel = function (level: keyof typeof LEVELS | number = 'fatal') {
let numericLevel: number = LEVELS.fatal;
if (typeof level === 'string') {
if (level.toLowerCase() in LEVELS) {
numericLevel = LEVELS[level];
Function createLabel
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createLabel = async (_vertexText, style, isTitle, isNode) => {
let vertexText = _vertexText || '';
if (typeof vertexText === 'object') {
vertexText = vertexText[0];
}
Function subroutine
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const subroutine = async (parent: SVGAElement, node: Node) => {
const { labelStyles, nodeStyles } = styles2String(node);
node.labelStyle = labelStyles;
const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));
const halfPadding = (node?.padding || 0) / 2;
Function addContainerBoundary
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addContainerBoundary = function (alias, label, type, tags, link) {
// if (parentBoundary === null) return;
// Don't allow label nulling
if (alias === null || label === null) {
Function addPersonOrSystemBoundary
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addPersonOrSystemBoundary = function (alias, label, type, tags, link) {
// if (parentBoundary === null) return;
// Don't allow label nulling
if (alias === null || label === null) {
Function sanitizeDirective
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const sanitizeDirective = (args: any): void => {
log.debug('sanitizeDirective called with', args);
// Return if not an object
if (typeof args !== 'object' || args == null) {
Function genSections
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const genSections: DiagramStylesProvider = (options) => {
let sections = '';
for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
options['lineColor' + i] = options['lineColor' + i] || options['cScaleInv' + i];
Function drawRect
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const drawRect = async (parent: SVGAElement, node: Node, options: RectOptions) => {
const { labelStyles, nodeStyles } = styles2String(node);
node.labelStyle = labelStyles;
// console.log('IPI labelStyles:', labelStyles);
const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));
Function doublecircle
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const doublecircle = async (parent: SVGAElement, node: Node): Promise<SVGAElement> => {
const { labelStyles, nodeStyles } = styles2String(node);
node.labelStyle = labelStyles;
const { shapeSvg, bbox, halfPadding } = await labelHelper(parent, node, getNodeClasses(node));
const gap = 5;
Function addActorRenderingData
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const addActorRenderingData = function (
diagram,
actors,
createdActors: Map<string, any>,
actorKeys,
Function draw
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const draw: DrawDefinition = function (txt, id, ver, diagObj) {
clear();
log.debug('in gitgraph renderer', txt + '\n', 'id:', id, ver);
if (!DEFAULT_GITGRAPH_CONFIG) {
Function addActor
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addActor = function (
id: string,
name: string,
description: { text: string; wrap?: boolean | null; type: string },
type: string
Function calculateSpace
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
calculateSpace(
xAxisPosition: typeof this.config.xAxisPosition,
showXAxis: boolean,
showYAxis: boolean,
showTitle: boolean
Function hexagon
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const hexagon = async (parent: SVGAElement, node: Node): Promise<SVGAElement> => {
const { labelStyles, nodeStyles } = styles2String(node);
node.labelStyle = labelStyles;
const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));