chanzuckerberg/corpora-data-portal

View on GitHub

Showing 455 of 793 total issues

Function dropins has 1970 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function dropins() {
  (function (e, o) {
    for (const t in o) e[t] = o[t];
  })(
    window,
Severity: Major
Found in frontend/src/components/DropboxChooser/components/dropins.js - About 1 wk to fix

    File dropins.js has 1972 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint-disable */
    export default function dropins() {
      (function (e, o) {
        for (const t in o) e[t] = o[t];
      })(
    Severity: Major
    Found in frontend/src/components/DropboxChooser/components/dropins.js - About 5 days to fix

      Function LandingPage has 846 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const LandingPage = (): JSX.Element => {
        const { ref: observerSection1, inView: inView1 } = useInView({
          rootMargin: ROOT_MARGIN,
        });
        const scrollSection1 = useRef<HTMLDivElement>(null);
      Severity: Major
      Found in frontend/src/views/Landing/index.tsx - About 4 days to fix

        Function Privacy has 655 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const Privacy = (): JSX.Element => {
          return (
            <Layout>
              <CommonStyle>
                <PrivacyStyle>
        Severity: Major
        Found in frontend/src/pages/privacy.tsx - About 3 days to fix

          File wheresMyGene.ts has 1163 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import { useContext, useMemo } from "react";
          import { useQuery, UseQueryResult } from "react-query";
          import { API_URL } from "src/configs/configs";
          import { FMG_GENE_STRENGTH_THRESHOLD } from "src/views/WheresMyGeneV2/common/constants";
          import {
          Severity: Major
          Found in frontend/src/common/queries/wheresMyGene.ts - About 2 days to fix

            File constants.ts has 1099 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import { EVENTS } from "src/common/analytics/events";
            import {
              ANALYTICS_PAYLOAD_KEY,
              CATEGORY_FILTER_ID,
              CATEGORY_FILTER_PANEL_ID,
            Severity: Major
            Found in frontend/src/components/common/Filter/common/constants.ts - About 2 days to fix

              File business.py has 982 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import copy
              import logging
              import os
              from collections import defaultdict
              from datetime import datetime
              Severity: Major
              Found in backend/layers/business/business.py - About 2 days to fix

                File persistence.py has 935 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import contextlib
                import json
                import logging
                import uuid
                from contextlib import contextmanager
                Severity: Major
                Found in backend/layers/persistence/persistence.py - About 2 days to fix

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

                  import Head from "next/head";
                  import Image from "next/image";
                  import Link from "next/link";
                  import { useMemo, useRef } from "react";
                  import { useInView } from "react-intersection-observer";
                  Severity: Major
                  Found in frontend/src/views/Landing/index.tsx - About 2 days to fix

                    File multiPanelOntologyUtils.ts has 854 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import { Filters, Row } from "react-table";
                    import { track } from "src/common/analytics";
                    import { EMPTY_ARRAY } from "src/common/constants/utils";
                    import {
                      buildNextSelectCategoryFilters,

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

                      import React, { useMemo, useEffect, useState, useRef } from "react";
                      import { Group } from "@visx/group";
                      import { Global } from "@emotion/react";
                      import { useTooltip, useTooltipInPortal } from "@visx/tooltip";
                      import { Tree, hierarchy } from "@visx/hierarchy";

                        Function initModule has 396 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                  (o.initModule = function () {
                                    let e;
                                    n.initModule(),
                                      null == Dropbox.appKey &&
                                        (Dropbox.appKey =
                        Severity: Major
                        Found in frontend/src/components/DropboxChooser/components/dropins.js - About 1 day to fix

                          File filter.ts has 750 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import { useMemo } from "react";
                          import { QueryStatus, useQuery, UseQueryResult } from "react-query";
                          import { API } from "src/common/API";
                          import {
                            ACCESS_TYPE,
                          Severity: Major
                          Found in frontend/src/common/queries/filter.ts - About 1 day to fix

                            File portal_api.py has 709 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import dataclasses
                            import itertools
                            from datetime import datetime
                            from typing import Iterable, List, Optional, Tuple
                            from urllib.parse import urlparse
                            Severity: Major
                            Found in backend/portal/api/portal_api.py - About 1 day to fix

                              File tree_builder.py has 697 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              import copy
                              import logging
                              from dataclasses import dataclass
                              from typing import Any, Dict, Tuple
                              
                              
                              Severity: Major
                              Found in backend/cellguide/pipeline/ontology_tree/tree_builder.py - About 1 day to fix

                                Function Content has 314 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const Content: FC<Props> = (props) => {
                                  const isEditCollection = !!props.id;
                                  const initialBooleanState = isEditCollection;
                                  const [isValid, setIsValid] = useState(initialBooleanState);
                                  const [isLoading, setIsLoading] = useState(false);

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

                                  /* eslint-disable react/no-unescaped-entities */
                                  import React, {
                                    Dispatch,
                                    ReactElement,
                                    ReactNode,

                                    File privacy.tsx has 667 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    import Head from "next/head";
                                    import Image from "next/image";
                                    import { ROUTES } from "src/common/constants/routes";
                                    import rawCellxgeneLogo from "src/components/common/staticPages/cellxgene.png";
                                    import {
                                    Severity: Major
                                    Found in frontend/src/pages/privacy.tsx - About 1 day to fix

                                      Function ToS has 291 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const ToS = (): JSX.Element => {
                                        return (
                                          <Layout>
                                            <CommonStyle>
                                              <TOSStyle>
                                      Severity: Major
                                      Found in frontend/src/pages/tos.tsx - About 1 day to fix

                                        Function Datasets has 289 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export default function Datasets(): JSX.Element {
                                          const { mode, status } = useViewMode();
                                        
                                          /* Pop toast if user has come from Explorer with work in progress */
                                          useExplainNewTab(
                                        Severity: Major
                                        Found in frontend/src/views/Datasets/index.tsx - About 1 day to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language