Showing 384 of 1,490 total issues
Function drawC4Shape
has 184 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const drawC4Shape = function (elem, c4Shape, conf) {
let fillColor = c4Shape.bgColor ? c4Shape.bgColor : conf[c4Shape.typeC4Shape.text + '_bg_color'];
let strokeColor = c4Shape.borderColor
? c4Shape.borderColor
: conf[c4Shape.typeC4Shape.text + '_border_color'];
File svgDraw.js
has 457 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { arc as d3arc, select } from 'd3';
const MAX_SECTIONS = 12;
export const drawRect = function (elem, rectData) {
const rectElem = elem.append('rect');
Function getCommits
has 172 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getCommits = () => {
return {
'0000001': {
id: '0000001',
seq: 1,
Function getArrowPoints
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getArrowPoints = (
duplicatedDirections: Direction[],
bbox: { width: number; height: number },
node: any
) => {
File erRenderer.js
has 443 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
import { line, curveBasis, select } from 'd3';
import { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';
import { getConfig } from '../../diagram-api/diagramAPI.js';
import { log } from '../../logger.js';
Function draw
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const draw = async function (text, id, _version, diagObj) {
log.info('Drawing flowchart');
const { securityLevel, flowchart: conf } = getConfig();
let sandboxElement;
if (securityLevel === 'sandbox') {
Function renderDoc
has 162 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderDoc = (doc, diagram, parentId, altBkg, root, domDocument, diagObj) => {
// Layout graph, Create a new directed graph
const graph = new graphlib.Graph({
compound: true,
multigraph: true,
File classDiagram.spec.js
has 435 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { imgSnapshotTest, renderGraph } from '../../helpers/util.ts';
describe('Class diagram', () => {
it('1: should render a simple class diagram', () => {
imgSnapshotTest(
File gitGraphAst.js
has 431 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { log } from '../../logger.js';
import { random } from '../../utils.js';
import { getConfig } from '../../diagram-api/diagramAPI.js';
import common from '../common/common.js';
import {
Function addVertices
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addVertices = async function (vert, svgId, root, doc, diagObj, parentLookupDb, graph) {
const svg = root.select(`[id="${svgId}"]`);
const nodes = svg.insert('g').attr('class', 'nodes');
const keys = Object.keys(vert);
Function draw
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const draw = function (text: string, id: string, version: string, diagObj: Diagram) {
//1. Fetch the configuration
const conf = getConfig();
// @ts-expect-error - wrong config?
const LEFT_MARGIN = conf.leftMargin ?? 50;
Function insertMarkers
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const insertMarkers = function (elem, conf) {
let marker;
elem
.append('defs')
Function apply
has 146 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const apply = function (param) {
if (Array.isArray(param)) {
param.forEach(function (item) {
apply(item);
});
File ganttDb.spec.ts
has 410 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// @ts-nocheck TODO: Fix TS
import dayjs from 'dayjs';
import ganttDb from './ganttDb.js';
import { convert } from '../../tests/util.js';
File baseAxis.ts
has 402 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import type {
BoundingRect,
Dimension,
DrawableElem,
Point,
File stateDb.js
has 397 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { log } from '../../logger.js';
import { generateId } from '../../utils.js';
import common from '../common/common.js';
import { getConfig } from '../../diagram-api/diagramAPI.js';
import {
Function addVertices
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addVertices = async function (vert, g, svgId, root, doc, diagObj) {
const svg = root.select(`[id="${svgId}"]`);
const keys = Object.keys(vert);
// Iterate through each item in the vertex object (containing all the vertices found) in the graph definition
File flowRenderer-v2.js
has 391 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
import { select, curveLinear, selectAll } from 'd3';
import { getConfig } from '../../diagram-api/diagramAPI.js';
import utils from '../../utils.js';
import { render } from '../../dagre-wrapper/index.js';
File flowRenderer.js
has 390 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
import { select, curveLinear, selectAll } from 'd3';
import { getConfig } from '../../diagram-api/diagramAPI.js';
import { render as Render } from 'dagre-d3-es';
import { applyStyle } from 'dagre-d3-es/src/dagre-js/util.js';
Function addEdges
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addEdges = function (edges, diagObj, graph, svg) {
log.info('abc78 edges = ', edges);
const labelsEl = svg.insert('g').attr('class', 'edgeLabels');
let linkIdCnt = {};
let dir = diagObj.db.getDirection();