appbaseio/dejaVu

View on GitHub

Showing 81 of 198 total issues

File language.js has 941 lines of code (exceeds 250 allowed). Consider refactoring.
Open

export default {
    universal: {
        analysis: {
            filter: {
                universal_stop: {
Severity: Major
Found in packages/dejavu-main/app/src/constants/language.js - About 2 days to fix

    File language.js has 941 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    export default {
        universal: {
            analysis: {
                filter: {
                    universal_stop: {
    Severity: Major
    Found in packages/browser/src/constants/language.js - About 2 days to fix

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

          render() {
              const {
                  stars,
                  showModal,
                  url,
      Severity: Major
      Found in packages/dejavu-main/site/src/App.js - About 2 days to fix

        File ConnectApp.js has 712 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        // @flow
        
        import React, { Component } from 'react';
        import { connect } from 'react-redux';
        import { Form, Button, Alert, AutoComplete, Input, Modal } from 'antd';
        Severity: Major
        Found in packages/browser/src/components/ConnectApp/ConnectApp.js - About 1 day to fix

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

              render() {
                  const {
                      appname,
                      url,
                      pastApps,
          Severity: Major
          Found in packages/browser/src/components/ConnectApp/ConnectApp.js - About 1 day to fix

            File App.js has 577 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            // @flow
            
            import React, { Component } from 'react';
            import {
                GithubButton,
            Severity: Major
            Found in packages/dejavu-main/site/src/App.js - About 1 day to fix

              Function handleFetchMappings has 187 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function* handleFetchMappings() {
                  const defaultError = 'Unable to get mappings';
                  const defaultErrorDescription = 'Please add mappings';
                  try {
                      yield put(clearError());
              Severity: Major
              Found in packages/browser/src/sagas/mappings.js - About 7 hrs to fix

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

                    render() {
                        const { indexTypeMap, typePropertyMapping, version } = this.props;
                        const {
                            addDataError,
                            documentId,
                Severity: Major
                Found in packages/browser/src/components/DataBrowser/AddRowModal.js - About 6 hrs to fix

                  File ExportData.js has 456 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 172 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        render() {
                            const { data, isShowingModal, isSavingData } = this.state;
                            const {
                                columns,
                                mappings,
                    Severity: Major
                    Found in packages/browser/src/components/DataBrowser/MultipleUpdate.js - About 6 hrs to fix

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

                            render() {
                                const { indexTypeMap, version } = 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

                            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

                              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 379 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 358 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

                                    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

                                      Function componentDidMount has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          componentDidMount() {
                                              // sync state from url
                                              let appname = '';
                                              let url = '';
                                              const { mode, isConnected, isHidden, forceReconnect } = this.props;
                                      Severity: Minor
                                      Found in packages/browser/src/components/ConnectApp/ConnectApp.js - About 4 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

                                      File mappings.js has 315 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      import get from 'lodash/get';
                                      import cloneDeep from 'lodash/cloneDeep';
                                      
                                      import { dateFormatMap } from './date';
                                      
                                      
                                      Severity: Minor
                                      Found in packages/browser/src/utils/mappings.js - About 3 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language