hadmean/hadmean

View on GitHub

Showing 150 of 428 total issues

Function FormSelect has 54 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function FormSelect(formInput: IFormSelect) {
  const {
    input,
    selectData,
    meta,
Severity: Major
Found in src/frontend/design-system/components/Form/Select/index.tsx - About 2 hrs to fix

    Function select has 54 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        select: (data: any) => {
          let returnData: T[] = data as unknown as T[];
          if (dataState.filters) {
            returnData = returnData.filter((datum) => {
              return dataState.filters.every(($filter) => {
    Severity: Major
    Found in src/frontend/components/FEPaginationTable/useFEPagination.ts - About 2 hrs to fix

      Function DateSettings has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function DateSettings() {
        const domainMessages = useAppConfigurationDomainMessages(
          "default_date_format"
        );
      
      
      Severity: Major
      Found in src/frontend/views/settings/Data/index.tsx - About 2 hrs to fix

        File index.tsx has 255 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import { useId } from "react";
        import { ChevronRight as ChevronRightIcon } from "react-feather";
        import Link from "next/link";
        import styled, { css } from "styled-components";
        import { USE_ROOT_COLOR } from "frontend/design-system/theme/root";

          Function ListManagerItem has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
          Open

          export function ListManagerItem({
            label,
            systemIcon,
            disabled,
            subLabel,

          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 Table has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
          Open

          export function Table<T extends unknown>({
            overridePaginatedDataState,
            tableData,
            syncPaginatedDataStateOut,
            columns,
          Severity: Minor
          Found in src/frontend/design-system/components/Table/index.tsx - About 2 hrs to fix

          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 useNavigationStack has 52 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const useNavigationStack = () => {
            const router = useRouter();
            const { _ } = useLingui();
          
            const [history, setHistory] = useNavigationHistoryStore((store) => [
          Severity: Major
          Found in src/frontend/lib/routing/useNavigationStack.ts - About 2 hrs to fix

            Function SystemSettings has 51 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function SystemSettings() {
              const systemSettings = useAppConfiguration("system_settings");
              const domainMessages = useAppConfigurationDomainMessages("system_settings");
            
              const documentationActionButton = useDocumentationActionButton(
            Severity: Major
            Found in src/frontend/views/settings/System/index.tsx - About 2 hrs to fix

              Function formatIntrospectData has 50 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                private formatIntrospectData(rawEntity: Entity[]): IDBSchema[] {
                  const dbSchema = rawEntity
                    .filter(({ name }) => !name.startsWith("dashpress"))
                    .map((entity) => {
                      return {
              Severity: Minor
              Found in src/backend/schema/schema.service.ts - About 2 hrs to fix

                Function parseForm has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export async function parseForm(
                  req: NextApiRequest
                ): Promise<{ fields: formidable.Fields; files: formidable.Files }> {
                  const fileUploadSettings = await configurationApiService.show(
                    "file_upload_settings"
                Severity: Minor
                Found in src/backend/uploads/parse.ts - About 1 hr to fix

                  Function NavigationSkeleton has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function NavigationSkeleton() {
                    const getThemeColorShade = useThemeColorShade();
                  
                    const SCHEMA = [
                      "header",
                  Severity: Minor
                  Found in src/frontend/_layouts/app/NavigationSideBar/NavigationSkeleton.tsx - About 1 hr to fix

                    Function viewSpecialDataTypes has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                    export const viewSpecialDataTypes = ({
                      fieldName,
                      value,
                      entityToOneReferenceFields = {},
                      entityFieldSelections = {},
                    Severity: Minor
                    Found in src/frontend/views/data/viewSpecialDataTypes.tsx - About 1 hr to fix

                    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 AsyncFormSelect has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                    export function AsyncFormSelect(props: IProps) {
                      const {
                        input,
                        url,
                        referenceUrl,
                    Severity: Minor
                    Found in src/frontend/design-system/components/Form/Select/Async/index.tsx - About 1 hr to fix

                    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 EntityDetails has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function EntityDetails() {
                      const entityId = useEntityId();
                      const entity = useEntitySlug();
                      const entityCrudConfig = useEntityCrudConfig(entity);
                      const dataDetails = useEntityDataDetails({ entity, entityId });
                    Severity: Minor
                    Found in src/frontend/views/data/Details/index.tsx - About 1 hr to fix

                      Function TableViewsSettings has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function TableViewsSettings() {
                        const entity = useEntitySlug();
                        const domainMessages = useAppConfigurationDomainMessages("table_views");
                      
                        const upsertTableViewsMutation = useUpsertConfigurationMutation(
                      Severity: Minor
                      Found in src/frontend/views/entity/Views/index.tsx - About 1 hr to fix

                        Function EntityCreate has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export function EntityCreate() {
                          const routeParams = useRouteParams();
                          const entity = useEntitySlug();
                          const entityCrudConfig = useEntityCrudConfig(entity);
                        
                        
                        Severity: Minor
                        Found in src/frontend/views/data/Create/index.tsx - About 1 hr to fix

                          Function ActionsIntegrations has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function ActionsIntegrations() {
                            const currentKey = useRouteParam("key");
                            const domainMessages = useDomainMessages(LANG_DOMAINS.INTEGRATIONS.ACTIONS);
                          
                            const integrationsList = useIntegrationsList();
                          Severity: Minor
                          Found in src/frontend/views/integrations/actions/index.tsx - About 1 hr to fix

                            Function DropDownMenu has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                            Open

                            export function DropDownMenu({
                              menuItems: menuItems$1,
                              disabled,
                              ellipsis,
                              ariaLabel,
                            Severity: Minor
                            Found in src/frontend/design-system/components/DropdownMenu/index.tsx - About 1 hr to fix

                            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 ManageCredentialGroup has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                            Open

                            export function ManageCredentialGroup({
                              group,
                              currentTab,
                            }: {
                              group: IntegrationsConfigurationGroup;
                            Severity: Minor
                            Found in src/frontend/views/settings/Variables/ManageCredentialGroup.tsx - About 1 hr to fix

                            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 useApi has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                            Open

                            export function useApi<T>(endPoint: string, options: IUseApiOptions<T>) {
                              const isRestoring = useIsRestoring();
                            
                              const builtOptions = buildApiOptions(options);
                              const router = useRouter();
                            Severity: Minor
                            Found in src/frontend/lib/data/useApi/index.ts - About 1 hr to fix

                            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

                            Severity
                            Category
                            Status
                            Source
                            Language