Geovation/photos

View on GitHub

Showing 138 of 138 total issues

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

  render() {
    const { fullScreen, user, open, classes } = this.props;

    return (
      <div>
Severity: Major
Found in src/components/EmailVerifiedDialog.js - About 3 hrs to fix

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

      render() {
        const { classes } = this.props;
    
        return (
          <PageWrapper label={config.PAGES.writeFeedback.label} handleClose={this.props.handleClose}>
    Severity: Major
    Found in src/components/WriteFeedbackPage.js - About 3 hrs to fix

      File SelectControlMultipleValue.js has 317 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      // https://material-ui.com/demos/autocomplete/#react-select
      
      /* eslint-disable react/prop-types, react/jsx-handler-names */
      
      import React from 'react';
      Severity: Minor
      Found in src/components/PhotoPage/SelectControlMultipleValue.js - About 3 hrs to fix

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

        const styles = (theme) => ({
          notchTop: {
            paddingTop: null,
          },
          iconButton: {
        Severity: Major
        Found in src/components/MapPage/DisplayPhoto.js and 1 other location - About 2 hrs to fix
        src/components/FeedbackReports/FeedbackDetailsPage.js on lines 19..35

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

        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

        const styles = (theme) => ({
          notchTop: {
            paddingTop: null,
          },
          iconButton: {
        Severity: Major
        Found in src/components/FeedbackReports/FeedbackDetailsPage.js and 1 other location - About 2 hrs to fix
        src/components/MapPage/DisplayPhoto.js on lines 32..48

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

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

        // https://material-ui.com/demos/autocomplete/#react-select
        
        /* eslint-disable react/prop-types, react/jsx-handler-names */
        
        import React from 'react';
        Severity: Minor
        Found in src/components/PhotoPage/SelectControlSingleValue.js - About 2 hrs to fix

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

            render() {
              const { handleClose, classes } = this.props;
              const label = config.PAGES.feedbackReports.label;
          
              return (
          Severity: Major
          Found in src/components/FeedbackReports/FeedbackReportsPage.js - About 2 hrs to fix

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

              render() {
                const { handleClose, photos } = this.props;
                const label = config.PAGES.moderator.label;
            
                return (
            Severity: Major
            Found in src/components/ModeratorPage.js - About 2 hrs to fix

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

              function Option(props) {
                return (
                  <MenuItem
                    buttonRef={props.innerRef}
                    selected={props.isFocused}
              Severity: Major
              Found in src/components/PhotoPage/SelectControlMultipleValue.js and 1 other location - About 2 hrs to fix
              src/components/PhotoPage/SelectControlSingleValue.js on lines 112..126

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

              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

              function Option(props) {
                return (
                  <MenuItem
                    buttonRef={props.innerRef}
                    selected={props.isFocused}
              Severity: Major
              Found in src/components/PhotoPage/SelectControlSingleValue.js and 1 other location - About 2 hrs to fix
              src/components/PhotoPage/SelectControlMultipleValue.js on lines 108..123

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

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

                render() {
                  const {
                    classes,
                    children,
                    label,
              Severity: Major
              Found in src/components/PageWrapper.js - About 2 hrs to fix

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

                  render() {
                    return (
                      <div>
                        {this.state.fieldValues.map((fieldValue, index) => {
                          return (
                Severity: Major
                Found in src/components/PhotoPage/MultiFields.js - About 2 hrs to fix

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

                  function firebaseInit(callBackFunctionFCMTokenChange) {
                    // Initialize Firebase
                    if (!firebaseApp) {
                      console.debug(config.FIREBASE.config);
                      firebaseApp = !firebase.apps.length
                  Severity: Major
                  Found in src/features/firebase/firebaseInit.js - About 2 hrs to fix

                    Function componentDidMount has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      async componentDidMount() {
                        mapboxgl.accessToken = config.MAPBOX_TOKEN;
                    
                        const mapLocation = this.props.mapLocation;
                        const zoom = mapLocation.zoom;
                    Severity: Major
                    Found in src/components/MapPage/Map.js - About 2 hrs to fix

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

                        render() {
                          const { classes, fullScreen, handleClose, user } = this.props;
                          const feedback = this.state.feedback;
                      
                          return (
                      Severity: Major
                      Found in src/components/FeedbackReports/FeedbackDetailsPage.js - About 2 hrs to fix

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

                                <RootRef rootRef={domRefInput}>
                                  <input
                                    className="hidden"
                                    type="file"
                                    accept="image/*"
                        Severity: Major
                        Found in src/components/ProfilePage.js and 1 other location - About 2 hrs to fix
                        src/App.js on lines 840..849

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

                        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

                              <RootRef rootRef={domRefInput}>
                                <input
                                  className="hidden"
                                  type="file"
                                  accept="image/*"
                        Severity: Major
                        Found in src/App.js and 1 other location - About 2 hrs to fix
                        src/components/ProfilePage.js on lines 212..221

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

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

                          render() {
                            const { classes, fields } = this.props;
                        
                            const imageVisible = this.state.openGeotag ? "hidden" : "visible";
                        
                        
                        Severity: Major
                        Found in src/components/PhotoPage/index.js - About 2 hrs to fix

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

                            render() {
                              const { classes } = this.props;
                              const FirstField = this.props.fields[0];
                              return (
                                <div style={{ marginBottom: 300 }}>
                          Severity: Major
                          Found in src/components/PhotoPage/Fields.js - About 2 hrs to fix

                            Function generateThumbnail has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              .onFinalize(async (object) => {
                                // File and directory paths.
                                const filePath = object.name;
                                const contentType = object.contentType; // This is the image MIME type
                                const fileDir = path.dirname(filePath);
                            Severity: Minor
                            Found in functions/index.js - About 2 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language