appbaseio/dejaVu

View on GitHub

Showing 201 of 201 total issues

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

export default {
    universal: {
        analysis: {
            filter: {
                universal_stop: {
Severity: Major
Found in packages/dejavu-main/app/src/constants/language.js and 1 other location - About 2 wks to fix
packages/browser/src/constants/language.js on lines 1..945

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

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 default {
    universal: {
        analysis: {
            filter: {
                universal_stop: {
Severity: Major
Found in packages/browser/src/constants/language.js and 1 other location - About 2 wks to fix
packages/dejavu-main/app/src/constants/language.js on lines 1..945

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

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 languages = [
    {
        value: 'universal',
        label: 'Universal',
    },
Severity: Major
Found in packages/browser/src/constants/es-languages.js and 1 other location - About 2 days to fix
packages/dejavu-main/app/src/constants/es-languages.js on lines 2..167

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

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 languages = [
    {
        value: 'universal',
        label: 'Universal',
    },
Severity: Major
Found in packages/dejavu-main/app/src/constants/es-languages.js and 1 other location - About 2 days to fix
packages/browser/src/constants/es-languages.js on lines 2..167

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

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

    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

      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

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

        export const openApp = async (rawUrl, indexName) => {
            const defaultError = 'Unable to get version';
            try {
                const { url } = parseUrl(rawUrl);
                const headers = getHeaders(rawUrl);
        Severity: Major
        Found in packages/browser/src/apis/analyzers.js and 1 other location - About 1 day to fix
        packages/browser/src/apis/analyzers.js on lines 54..94

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

        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

        export const closeApp = async (rawUrl, indexName) => {
            const defaultError = 'Unable to get version';
            try {
                const { url } = parseUrl(rawUrl);
                const headers = getHeaders(rawUrl);
        Severity: Major
        Found in packages/browser/src/apis/analyzers.js and 1 other location - About 1 day to fix
        packages/browser/src/apis/analyzers.js on lines 96..136

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

        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

                            <Row>
                                <Col span={12}>
                                    <Item style={{ marginRight: '15px' }} label="Index">
                                        <Select
                                            defaultValue={selectedIndex}
        Severity: Major
        Found in packages/browser/src/components/DataBrowser/AddRowModal.js and 2 other locations - About 1 day to fix
        packages/browser/src/components/DataBrowser/AddFieldModal.js on lines 279..317
        packages/browser/src/components/DataBrowser/ExportData.js on lines 358..396

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

        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

                            <Row>
                                <Col span={12}>
                                    <Item style={{ marginRight: '15px' }} label="Index">
                                        <Select
                                            defaultValue={selectedIndex}
        packages/browser/src/components/DataBrowser/AddRowModal.js on lines 240..278
        packages/browser/src/components/DataBrowser/ExportData.js on lines 358..396

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

        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

                            <Row>
                                <Col span={12}>
                                    <Item style={{ marginRight: '15px' }} label="Index">
                                        <Select
                                            defaultValue={selectedIndex}
        Severity: Major
        Found in packages/browser/src/components/DataBrowser/ExportData.js and 2 other locations - About 1 day to fix
        packages/browser/src/components/DataBrowser/AddFieldModal.js on lines 279..317
        packages/browser/src/components/DataBrowser/AddRowModal.js on lines 240..278

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

        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 ConnectApp.js has 711 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 311 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

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

            export const exampleConfig = [
                {
                    title: 'Import Data',
                    description: 'Learn how to bring your data to appbase.io.',
                    image: {
            Severity: Major
            Found in packages/browser/src/constants/config.js and 1 other location - About 1 day to fix
            packages/dejavu-main/app/src/constants/config.js on lines 23..101

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

            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 exampleConfig = [
                {
                    title: 'Import Data',
                    description: 'Learn how to bring your data to appbase.io.',
                    image: {
            Severity: Major
            Found in packages/dejavu-main/app/src/constants/config.js and 1 other location - About 1 day to fix
            packages/browser/src/constants/config.js on lines 23..101

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

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

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