chanzuckerberg/corpora-data-portal

View on GitHub

Showing 793 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

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    const AnnotateInactiveIcon = (): JSX.Element => (
      <svg
        width="100"
        height="101"
        viewBox="0 0 100 101"
    Severity: Major
    Found in frontend/src/views/Landing/icons/annotate-inactive.tsx and 1 other location - About 6 days to fix
    frontend/src/views/Landing/icons/annotate-active.tsx on lines 1..232

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 1112.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    const AnnotateActiveIcon = (): JSX.Element => (
      <svg
        width="100"
        height="101"
        viewBox="0 0 100 101"
    Severity: Major
    Found in frontend/src/views/Landing/icons/annotate-active.tsx and 1 other location - About 6 days to fix
    frontend/src/views/Landing/icons/annotate-inactive.tsx on lines 1..232

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 1112.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    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

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      const CensusActiveIcon = (): JSX.Element => (
        <svg
          width="100"
          height="100"
          viewBox="0 0 100 100"
      Severity: Major
      Found in frontend/src/views/Landing/icons/census-active.tsx and 1 other location - About 5 days to fix
      frontend/src/views/Landing/icons/census-inactive.tsx on lines 1..158

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 896.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      const CensusInactiveIcon = (): JSX.Element => (
        <svg
          width="100"
          height="100"
          viewBox="0 0 100 100"
      Severity: Major
      Found in frontend/src/views/Landing/icons/census-inactive.tsx and 1 other location - About 5 days to fix
      frontend/src/views/Landing/icons/census-active.tsx on lines 1..158

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 896.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      const CellGuideInactiveIcon = (): JSX.Element => (
        <svg
          width="100"
          height="100"
          viewBox="0 0 100 100"
      Severity: Major
      Found in frontend/src/views/Landing/icons/cellguide-inactive.tsx and 1 other location - About 4 days to fix
      frontend/src/views/Landing/icons/cellguide-active.tsx on lines 1..130

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 762.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      const CellGuideActiveIcon = (): JSX.Element => (
        <svg
          width="100"
          height="100"
          viewBox="0 0 100 100"
      Severity: Major
      Found in frontend/src/views/Landing/icons/cellguide-active.tsx and 1 other location - About 4 days to fix
      frontend/src/views/Landing/icons/cellguide-inactive.tsx on lines 1..130

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 762.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      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

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        const GeneExpressionActiveIcon = (): JSX.Element => (
          <svg
            width="100"
            height="101"
            viewBox="0 0 100 101"
        Severity: Major
        Found in frontend/src/views/Landing/icons/gene-expression-active.tsx and 1 other location - About 4 days to fix
        frontend/src/views/Landing/icons/gene-expression-inactive.tsx on lines 1..140

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 692.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        const GeneExpressionInactiveIcon = (): JSX.Element => (
          <svg
            width="100"
            height="101"
            viewBox="0 0 100 101"
        Severity: Major
        Found in frontend/src/views/Landing/icons/gene-expression-inactive.tsx and 1 other location - About 4 days to fix
        frontend/src/views/Landing/icons/gene-expression-active.tsx on lines 1..140

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 692.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        const CollectionsDatasetsInactiveIcon = (): JSX.Element => (
          <svg
            width="100"
            height="101"
            viewBox="0 0 100 101"
        frontend/src/views/Landing/icons/collections-datasets-active.tsx on lines 1..88

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 631.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        const CollectionsDatasetsActiveIcon = (): JSX.Element => (
          <svg
            width="100"
            height="101"
            viewBox="0 0 100 101"
        frontend/src/views/Landing/icons/collections-datasets-inactive.tsx on lines 1..88

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 631.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        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,
                      Severity
                      Category
                      Status
                      Source
                      Language