trezy/firebase-system-update

View on GitHub

Showing 44 of 67 total issues

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

                        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

                              Function FieldInput has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function FieldInput(props) {
                                  const {
                                      alignment,
                                      autocomplete,
                                      className,
                              Severity: Minor
                              Found in src/components/Form/FieldInput.js - About 2 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

                              Function FieldFile has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function FieldFile(props) {
                                  const {
                                      accept,
                                      className,
                                      filename,
                              Severity: Major
                              Found in src/components/Form/FieldFile.js - About 2 hrs to fix

                                Function ProjectConfigurationFooter has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

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

                                  Function FieldRadioGroup has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  function FieldRadioGroup(props) {
                                      const {
                                          className,
                                          id,
                                          isDisabled,
                                  Severity: Minor
                                  Found in src/components/Form/FieldRadioGroup.js - About 2 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

                                  Function Installer has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export function Installer() {
                                      const {
                                          cancelConfiguration,
                                          data: { projects },
                                          finishConfiguration,
                                  Severity: Major
                                  Found in src/components/Installer/index.js - About 2 hrs to fix

                                    Function ProjectSummary has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function ProjectSummary(props) {
                                        const {
                                            projectID,
                                            onOpen,
                                        } = props
                                    Severity: Major
                                    Found in src/components/Installer/ProjectSummary.js - About 2 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language