Showing 407 of 1,235 total issues
Function generateElements
has a Cognitive Complexity of 145 (exceeds 5 allowed). Consider refactoring. Open
export function generateElements(
getLayoutedElements: (
incomingEles: (Node | Edge)[],
orientation: Orientation
) => (Node | Edge)[],
- 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 usePages
has 462 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const usePages = (): PageType & EnterprisePageType => {
const enterprisePages: EnterprisePageType = isEnterprise()
? {
permissions: {
name: "components.mainMenu.permissions",
File languageSamples.ts
has 861 lines of code (exceeds 250 allowed). Consider refactoring. Open
export const HtmlSample = `
<!DOCTYPE HTML>
<!--Example of comments in HTML-->
<html>
<head>
File pages.tsx
has 691 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
ActivitySquare,
BadgeCheck,
Boxes,
FolderTree,
File run.spec.ts
has 603 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { createNamespace, deleteNamespace } from "../../utils/namespace";
import { expect, test } from "@playwright/test";
import {
jsonSchemaFormWorkflow,
jsonSchemaWithRequiredEnum,
File index.spec.ts
has 576 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { checkIfFileExists, createDirectory } from "e2e/utils/files";
import {
checkIfNamespaceExists,
createNamespace,
createNamespaceName,
Function buildRouter
has a Cognitive Complexity of 77 (exceeds 20 allowed). Consider refactoring. Open
func buildRouter(endpoints []core.Endpoint, consumers []core.Consumer) *router {
serveMux := http.NewServeMux()
checkUniqueGatewayPaths := map[string]string{}
- 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 MoreDetailedShell
has 236 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const MoreDetailedShell = () => {
const [theme, setTheme] = useState<"light" | "dark" | undefined>();
useEffect(() => {
const html = document.documentElement;
File engine.go
has 803 lines of code (exceeds 500 allowed). Consider refactoring. Open
package flow
import (
"context"
"encoding/base64"
Function JqPlaygroundPage
has 214 lines of code (exceeds 25 allowed). Consider refactoring. Open
const JqPlaygroundPage: FC = () => {
const { t } = useTranslation();
const theme = useTheme();
const {
setData: storePlaygroundDataInLocalstorage,
Function usePages
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
export const usePages = (): PageType & EnterprisePageType => {
const enterprisePages: EnterprisePageType = isEnterprise()
? {
permissions: {
name: "components.mainMenu.permissions",
- 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 generateElements
has 184 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function generateElements(
getLayoutedElements: (
incomingEles: (Node | Edge)[],
orientation: Orientation
) => (Node | Edge)[],
Function SecretsList
has 183 lines of code (exceeds 25 allowed). Consider refactoring. Open
const SecretsList: FC = () => {
const { t } = useTranslation();
const [dialogOpen, setDialogOpen] = useState(false);
const [deleteSecret, setDeleteSecret] = useState<SecretSchemaType>();
const [editItem, setEditItem] = useState<SecretSchemaType>();
File index.stories.tsx
has 462 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
Box,
Bug,
Calendar,
ChevronsUpDown,
File index.tsx
has 454 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
DialogClose,
DialogFooter,
DialogHeader,
DialogTitle,
Function VariablesList
has 165 lines of code (exceeds 25 allowed). Consider refactoring. Open
const VariablesList: FC = () => {
const { t } = useTranslation();
const [dialogOpen, setDialogOpen] = useState(false);
const [deleteItem, setDeleteItem] = useState<VarSchemaType>();
const [editItem, setEditItem] = useState<VarSchemaType>();
File apiFactory.test.ts
has 418 lines of code (exceeds 250 allowed). Consider refactoring. Open
import "cross-fetch/polyfill";
import { ResponseParser, apiFactory } from "../apiFactory";
import {
afterAll,
Function Header
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Header: FC = () => {
const pages = usePages();
const { t } = useTranslation();
const {
path,
Method engine.runState
has a Cognitive Complexity of 54 (exceeds 20 allowed). Consider refactoring. Open
func (engine *engine) runState(ctx context.Context, im *instanceMemory, wakedata []byte, err error) *states.Transition {
ctx = tracing.AddNamespace(ctx, im.Namespace().Name)
ctx = tracing.WithTrack(ctx, tracing.BuildInstanceTrack(im.instance))
ctx, cleanup, err3 := tracing.NewSpan(ctx, "preparing instance for state execution")
if err != nil {
- 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 index.spec.ts
has 398 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { createNamespace, deleteNamespace } from "e2e/utils/namespace";
import { createRouteYaml, removeLines } from "./utils";
import { expect, test } from "@playwright/test";
import { createFile } from "e2e/utils/files";