appbaseio/dejaVu

View on GitHub

Showing 201 of 201 total issues

File ExportData.js has 453 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// @flow
import React, { Component, Fragment } from 'react';
import { DownloadOutlined } from '@ant-design/icons';
import { Modal, Button, Spin, Alert, Row, Col, Select, Checkbox } from 'antd';
import { connect } from 'react-redux';
Severity: Minor
Found in packages/browser/src/components/DataBrowser/ExportData.js - About 6 hrs to fix

    Function render has 164 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        render() {
            const {
                isShowingModal,
                isDownloading,
                error,
    Severity: Major
    Found in packages/browser/src/components/DataBrowser/ExportData.js - About 6 hrs to fix

      Function render has 161 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          render() {
              const { indexTypeMap } = this.props;
              const {
                  addColumnError,
                  addColumnField,
      Severity: Major
      Found in packages/browser/src/components/DataBrowser/AddFieldModal.js - About 6 hrs to fix

        Function render has 155 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            render() {
                const {
                    reactiveListKey,
                    sortField,
                    sortOrder,
        Severity: Major
        Found in packages/browser/src/components/DataBrowser/ResultSet.js - About 6 hrs to fix

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

                              <Footer.List>
                                  <Title>Companion Tools</Title>
                                  <li>
                                      <a
                                          href="https://appbase.io"
          Severity: Major
          Found in packages/dejavu-main/site/src/components/Footer.js and 2 other locations - About 6 hrs to fix
          packages/dejavu-main/site/src/components/Footer.js on lines 123..152
          packages/dejavu-main/site/src/components/Footer.js on lines 153..182

          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 156.

          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 3 locations. Consider refactoring.
          Open

                              <Footer.List>
                                  <Title>More</Title>
                                  <li>
                                      <a
                                          href="https://medium.appbase.io/"
          Severity: Major
          Found in packages/dejavu-main/site/src/components/Footer.js and 2 other locations - About 6 hrs to fix
          packages/dejavu-main/site/src/components/Footer.js on lines 93..122
          packages/dejavu-main/site/src/components/Footer.js on lines 123..152

          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 156.

          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 3 locations. Consider refactoring.
          Open

                              <Footer.List>
                                  <Title>Community</Title>
                                  <li>
                                      <a
                                          target="_blank"
          Severity: Major
          Found in packages/dejavu-main/site/src/components/Footer.js and 2 other locations - About 6 hrs to fix
          packages/dejavu-main/site/src/components/Footer.js on lines 93..122
          packages/dejavu-main/site/src/components/Footer.js on lines 153..182

          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 156.

          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

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

          export const SETTINGS = {
              'index.max_ngram_diff': 10,
              analysis: {
                  analyzer: {
                      autosuggest_analyzer: {
          Severity: Major
          Found in packages/dejavu-main/app/src/constants/index.js and 1 other location - About 5 hrs to fix
          packages/browser/src/constants/index.js on lines 10..40

          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 146.

          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

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

          export const SETTINGS = {
              'index.max_ngram_diff': 10,
              analysis: {
                  analyzer: {
                      autosuggest_analyzer: {
          Severity: Major
          Found in packages/browser/src/constants/index.js and 1 other location - About 5 hrs to fix
          packages/dejavu-main/app/src/constants/index.js on lines 10..40

          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 146.

          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

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

          export const getURL = () => {
              let url = localStorage.getItem('url') || sessionStorage.getItem('url');
              const params = new URLSearchParams(window.location.search);
              if (!url || url === 'undefined') {
                  url = params.has('url') ? params.get('url') : 'null';
          Severity: Major
          Found in packages/dejavu-main/app/src/constants/config.js and 1 other location - About 5 hrs to fix
          packages/browser/src/constants/config.js on lines 1..10

          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 145.

          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

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

          export const getURL = () => {
              let url = localStorage.getItem('url') || sessionStorage.getItem('url');
              const params = new URLSearchParams(window.location.search);
              if (!url || url === 'undefined') {
                  url = params.has('url') ? params.get('url') : 'null';
          Severity: Major
          Found in packages/browser/src/constants/config.js and 1 other location - About 5 hrs to fix
          packages/dejavu-main/app/src/constants/config.js on lines 1..10

          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 145.

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

              render() {
                  const {
                      mappings,
                      appname,
                      sortField,
          Severity: Major
          Found in packages/browser/src/components/DataTable/ColumnHeader.js - About 5 hrs to fix

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

                        {
                            isShowingModal: false,
                            addDataError: false,
                            addDataValue: `{\n}`,
                            documentId: '',
            Severity: Major
            Found in packages/browser/src/components/DataBrowser/AddRowModal.js and 1 other location - About 5 hrs to fix
            packages/browser/src/components/DataBrowser/AddRowModal.js on lines 56..68

            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 141.

            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

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

                state = {
                    isShowingModal: false,
                    addDataError: false,
                    addDataValue: `{\n}`,
                    documentId: '',
            Severity: Major
            Found in packages/browser/src/components/DataBrowser/AddRowModal.js and 1 other location - About 5 hrs to fix
            packages/browser/src/components/DataBrowser/AddRowModal.js on lines 98..112

            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 141.

            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 MultipleUpdate.js has 383 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            // @flow
            
            import React, { Component, Fragment } from 'react';
            import { Modal, Select, Button } from 'antd';
            import { CloseOutlined, PlusOutlined, EditOutlined } from '@ant-design/icons';
            Severity: Minor
            Found in packages/browser/src/components/DataBrowser/MultipleUpdate.js - About 5 hrs to fix

              File AddFieldModal.js has 377 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              // @flow
              
              import React, { Component, Fragment } from 'react';
              import { Modal, Input, Select, Radio, Row, Col, Button } from 'antd';
              import { PlusOutlined } from '@ant-design/icons';
              Severity: Minor
              Found in packages/browser/src/components/DataBrowser/AddFieldModal.js - About 5 hrs to fix

                File AddRowModal.js has 356 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                // @flow
                
                import React, { Component, Fragment } from 'react';
                import { Modal, Input, Select, Row, Col, Button, Tabs } from 'antd';
                import { PlusOutlined } from '@ant-design/icons';
                Severity: Minor
                Found in packages/browser/src/components/DataBrowser/AddRowModal.js - About 4 hrs to fix

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

                  const ALLOWED_ACTIONS_LABELS = {
                      [ALLOWED_ACTIONS.OVERVIEW]: 'Overview',
                      [ALLOWED_ACTIONS.DEVELOP]: 'Data',
                      [ALLOWED_ACTIONS.ANALYTICS]: 'Analytics',
                      [ALLOWED_ACTIONS.CURATED_INSIGHTS]: 'Curated Insights',
                  Severity: Major
                  Found in packages/dejavu-main/app/src/constants/index.js and 1 other location - About 4 hrs to fix
                  packages/browser/src/constants/index.js on lines 120..133

                  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 118.

                  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

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

                  const ALLOWED_ACTIONS_LABELS = {
                      [ALLOWED_ACTIONS.OVERVIEW]: 'Overview',
                      [ALLOWED_ACTIONS.DEVELOP]: 'Data',
                      [ALLOWED_ACTIONS.ANALYTICS]: 'Analytics',
                      [ALLOWED_ACTIONS.CURATED_INSIGHTS]: 'Curated Insights',
                  Severity: Major
                  Found in packages/browser/src/constants/index.js and 1 other location - About 4 hrs to fix
                  packages/dejavu-main/app/src/constants/index.js on lines 120..133

                  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 118.

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

                      render() {
                          const {
                              url: rawUrl,
                              isLoading,
                              mappings,
                  Severity: Major
                  Found in packages/browser/src/components/DataBrowser/DataBrowser.js - About 4 hrs to fix
                    Severity
                    Category
                    Status
                    Source
                    Language