Showing 429 of 1,682 total issues
Function addComponent
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addComponent = function (typeC4Shape, alias, label, techn, descr, sprite, tags, link) {
// Don't allow label nulling
if (alias === null || label === null) {
return;
}
File quadrantChart.spec.js
has 261 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { imgSnapshotTest } from '../../helpers/util.ts';
describe('Quadrant Chart', () => {
it('should render if only chart type is provided', () => {
imgSnapshotTest(
Function draw
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const draw = function (text, id, version, diagObj) {
const conf = getConfig().journey;
const securityLevel = getConfig().securityLevel;
// Handle root and Document for when rendering in sandbox mode
Function calculateActorMargins
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function calculateActorMargins(
actors: Map<string, any>,
actorToMessageWidth: Awaited<ReturnType<typeof getMaxMessageWidthPerActor>>,
boxes
) {
Function drawTask
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const drawTask = function (elem, task, conf) {
const center = task.x + conf.width / 2;
const g = elem.append('g');
taskCount++;
const maxHeight = 300 + 5 * 30;
Function cylinder
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const cylinder = async (parent: SVGAElement, node: Node) => {
const { labelStyles, nodeStyles } = styles2String(node);
node.labelStyle = labelStyles;
const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));
const w = bbox.width + node.padding;
Function cylinder
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function cylinder(parent, bbox, node) {
const w = bbox.width;
const rx = w / 2;
const ry = rx / (2.5 + w / 50);
const h = bbox.height + ry;
Function draw
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const draw = (_text: string, id: string, version: string) => {
log.debug('rendering svg for syntax error\n');
const svg: SVG = selectSvgElement(id);
const g: SVGGroup = svg.append('g');
Function calculateHorizontalSpace
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private calculateHorizontalSpace() {
let availableWidth = this.chartConfig.width;
let availableHeight = this.chartConfig.height;
let titleYEnd = 0;
let plotX = 0;
Function roundedWithTitle
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const roundedWithTitle = (parent, node) => {
const siteConfig = getConfig();
// Add outer g element
const shapeSvg = parent.insert('g').attr('class', node.classes).attr('id', node.id);
Function drawDescrState
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const drawDescrState = (g, stateDef) => {
const addTspan = function (textEl, txt, isFirst) {
const tSpan = textEl
.append('tspan')
.attr('x', 2 * getConfig().state.padding)
Function addDeploymentNode
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addDeploymentNode = function (
nodeType,
alias,
label,
type,
Function getStyles
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getStyles = (
type: string,
userStyles: string,
options: {
fontFamily: string;
Function intersection
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const intersection = (node, outsidePoint, insidePoint) => {
log.debug(`intersection calc abc89:
outsidePoint: ${JSON.stringify(outsidePoint)}
insidePoint : ${JSON.stringify(insidePoint)}
node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);
Function intersection
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const intersection = (node, outsidePoint, insidePoint) => {
log.debug(`intersection calc abc89:
outsidePoint: ${JSON.stringify(outsidePoint)}
insidePoint : ${JSON.stringify(insidePoint)}
node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);
Function setupDoc
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const setupDoc = (parentParsedItem, doc, diagramStates, nodes, edges, altFlag, look, classes) => {
// graphItemCount = 0;
log.trace('items', doc);
doc.forEach((item) => {
switch (item.stmt) {
Function calculateVerticalSpace
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private calculateVerticalSpace() {
let availableWidth = this.chartConfig.width;
let availableHeight = this.chartConfig.height;
let plotX = 0;
let plotY = 0;
Function getIntersectPoint
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
let getIntersectPoint = function (fromNode, endPoint) {
let x1 = fromNode.x;
let y1 = fromNode.y;
Function getLineFunctionsWithOffset
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getLineFunctionsWithOffset = (
edge: Pick<EdgeData, 'arrowTypeStart' | 'arrowTypeEnd'>
) => {
return {
x: function (
Function drawTasks
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const drawTasks = function (diagram, tasks, verticalPos) {
const conf = getConfig().journey;
let lastSection = '';
const sectionVHeight = conf.height * 2 + conf.diagramMarginY;
const taskPos = verticalPos + sectionVHeight;