trezy/firebase-system-update

View on GitHub

Showing 67 of 67 total issues

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

function SetupRemoteConfigFields(props) {
    const { projectID } = props
    const { changeStepCompletion } = useAppContext()
    const {
        updateValue,
Severity: Major
Found in src/components/Installer/SetupRemoteConfigFields.js and 2 other locations - About 1 day to fix
src/components/Installer/SetupRealtimeDatabaseFields.js on lines 21..80
src/components/Installer/SetupStorageFields.js on lines 21..80

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

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

function SetupStorageFields(props) {
    const { projectID } = props
    const { changeStepCompletion } = useAppContext()
    const {
        updateValue,
Severity: Major
Found in src/components/Installer/SetupStorageFields.js and 2 other locations - About 1 day to fix
src/components/Installer/SetupRealtimeDatabaseFields.js on lines 21..80
src/components/Installer/SetupRemoteConfigFields.js on lines 21..80

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

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

function SetupRealtimeDatabaseFields(props) {
    const { projectID } = props
    const { changeStepCompletion } = useAppContext()
    const {
        updateValue,
Severity: Major
Found in src/components/Installer/SetupRealtimeDatabaseFields.js and 2 other locations - About 1 day to fix
src/components/Installer/SetupRemoteConfigFields.js on lines 21..80
src/components/Installer/SetupStorageFields.js on lines 21..80

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

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

const AppContextProvider = props => {
    const {
        children,
        code,
        configurationID,
Severity: Major
Found in src/contexts/AppContext.js - About 6 hrs to fix

    Function reducer has 147 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function reducer(state, action) {
        const {
            payload,
            type,
        } = action
    Severity: Major
    Found in src/contexts/AppContext.js - About 5 hrs to fix

      Function FieldInput has 135 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function FieldInput(props) {
          const {
              alignment,
              autocomplete,
              className,
      Severity: Major
      Found in src/components/Form/FieldInput.js - About 5 hrs to fix

        Function GithubExplorer has 134 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function GithubExplorer(props) {
            const {
                onSelect,
                projectID,
                title,
        Severity: Major
        Found in src/components/GithubExplorer.js - About 5 hrs to fix

          File AppContext.js has 382 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          // Module imports
          import {
              createContext,
              useCallback,
              useContext,
          Severity: Minor
          Found in src/contexts/AppContext.js - About 5 hrs to fix

            Function FieldRadioGroup has 119 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function FieldRadioGroup(props) {
                const {
                    className,
                    id,
                    isDisabled,
            Severity: Major
            Found in src/components/Form/FieldRadioGroup.js - About 4 hrs to fix

              Function handler has 116 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export const handler = async (request, response) => {
                  const errors = []
                  const responseJSON = {
                      accessToken: null,
                      projects: {},
              Severity: Major
              Found in src/pages/api/install.js - About 4 hrs to fix

                Function ProjectConfiguration has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function ProjectConfiguration(props) {
                    const {
                        projectID,
                        isOpen,
                        onClose,
                Severity: Major
                Found in src/components/Installer/ProjectConfiguration.js - About 4 hrs to fix

                  Function FieldColor has 101 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function FieldColor(props) {
                      const {
                          className,
                          id,
                          isDisabled,
                  Severity: Major
                  Found in src/components/Form/FieldColor.js - About 4 hrs to fix

                    Function ProjectConfigurationSidebar has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function ProjectConfigurationSidebar(props) {
                        const { projectID } = props
                        const {
                            data: { projects },
                        } = useAppContext()
                    Severity: Major
                    Found in src/components/Installer/ProjectConfigurationSidebar.js - About 3 hrs to fix

                      Function SetupServiceAccountFields has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function SetupServiceAccountFields(props) {
                          const { projectID } = props
                          const { changeStepCompletion } = useAppContext()
                          const {
                              updateValidity,
                      Severity: Major
                      Found in src/components/Installer/SetupServiceAccountFields.js - About 3 hrs to fix

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

                                    <ul className="menu-list">
                                        <li>
                                            <Link href="/">
                                                <a>Dashboard</a>
                                            </Link>
                        Severity: Major
                        Found in src/components/Installer/ProjectConfigurationSidebar.js and 2 other locations - About 3 hrs to fix
                        src/components/Installer/ProjectConfigurationSidebar.js on lines 45..57
                        src/components/Installer/ProjectConfigurationSidebar.js on lines 62..74

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

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

                                    <ul className="menu-list">
                                        <li>
                                            <Link href="/">
                                                <a>Dashboard</a>
                                            </Link>
                        Severity: Major
                        Found in src/components/Installer/ProjectConfigurationSidebar.js and 2 other locations - About 3 hrs to fix
                        src/components/Installer/ProjectConfigurationSidebar.js on lines 28..40
                        src/components/Installer/ProjectConfigurationSidebar.js on lines 62..74

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

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

                                    <ul className="menu-list">
                                        <li>
                                            <Link href="/">
                                                <a>Dashboard</a>
                                            </Link>
                        Severity: Major
                        Found in src/components/Installer/ProjectConfigurationSidebar.js and 2 other locations - About 3 hrs to fix
                        src/components/Installer/ProjectConfigurationSidebar.js on lines 28..40
                        src/components/Installer/ProjectConfigurationSidebar.js on lines 45..57

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

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

                        function SetupFirestoreFields(props) {
                            const { projectID } = props
                            const { changeStepCompletion } = useAppContext()
                            const {
                                updateValue,
                        Severity: Major
                        Found in src/components/Installer/SetupFirestoreFields.js - About 3 hrs to fix

                          Function Form has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const Form = props => {
                              const {
                                  children,
                                  className,
                                  initialValues,
                          Severity: Major
                          Found in src/components/Form/index.js - About 2 hrs to fix

                            Function Field has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function Field(props) {
                                const {
                                    children,
                                    className,
                                    helperText,
                            Severity: Major
                            Found in src/components/Form/Field.js - About 2 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language