cozy-labs/cozy-desktop

View on GitHub

Showing 610 of 610 total issues

Avoid too many return statements within this function.
Open

    if (areParentChild(createdPath(move), createdPath(b))) return moveFirst
Severity: Major
Found in core/remote/change.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        if (areParentChild(createdPath(move), deletedPath(b))) return moveFirst
    Severity: Major
    Found in core/remote/change.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          if (areEqual(deletedId(b), createdId(move))) return -moveFirst
      Severity: Major
      Found in core/remote/change.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

          return addFirst
        Severity: Major
        Found in core/remote/change.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

              return 0
          Severity: Major
          Found in core/remote/change.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return squashMoves(doc, was, previousChanges, originalMoves)
            Severity: Major
            Found in core/remote/watcher/index.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                        return new RemoteError({
                          code: FILE_TOO_LARGE_CODE,
                          message: 'The file is larger than allowed by the remote Cozy',
                          err
                        })
              Severity: Major
              Found in core/remote/errors.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                          return new RemoteError({
                            code: UNREACHABLE_COZY_CODE,
                            message: 'Cannot reach remote Cozy',
                            err
                          })
                Severity: Major
                Found in core/remote/errors.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                    if (localChange.isChildDelete(a, b)) return bFirst
                  Severity: Major
                  Found in core/local/chokidar/analysis.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                      if (localChange.isChildAdd(a, b)) return aFirst
                    Severity: Major
                    Found in core/local/chokidar/analysis.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          return aFirst
                      Severity: Major
                      Found in core/local/chokidar/analysis.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                            return bFirst
                        Severity: Major
                        Found in core/local/chokidar/analysis.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                else return bunyanErrObjectToError(err)
                          Severity: Major
                          Found in core/utils/sentry.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                return { type: 'DEL', side: outdatedSide.name }
                            Severity: Major
                            Found in core/sync/index.js - About 30 mins to fix

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

                                  if (doc.docType !== metadata.FILE && doc.docType !== metadata.FOLDER) {
                                    return {
                                      sideName,
                                      type: 'InvalidChange',
                                      doc,
                              Severity: Minor
                              Found in core/remote/watcher/index.js and 1 other location - About 30 mins to fix
                              core/remote/watcher/index.js on lines 421..448

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

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

                                      case 'FileUpdate':
                                        log.info({ path }, 'file was updated remotely')
                                        await this.prep.updateFileAsync(sideName, change.doc)
                                        break
                              Severity: Major
                              Found in core/remote/watcher/index.js and 5 other locations - About 30 mins to fix
                              core/remote/watcher/index.js on lines 623..626
                              core/remote/watcher/index.js on lines 627..630
                              core/remote/watcher/index.js on lines 631..634
                              core/remote/watcher/index.js on lines 635..638
                              core/remote/watcher/index.js on lines 643..646

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

                              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

                              Avoid too many return statements within this function.
                              Open

                                    return {
                                      action: 'renamed',
                                      kind,
                                      oldPath: relativeOldPath,
                                      path: relativePath,
                              Severity: Major
                              Found in core/local/channel_watcher/parcel_producer.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                      return { action: 'created', kind, path: relativePath, ino }
                                Severity: Major
                                Found in core/local/channel_watcher/parcel_producer.js - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                      return { type: 'ADD', side: outdatedSide.name }
                                  Severity: Major
                                  Found in core/sync/index.js - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                              return { type: 'EDIT', side: outdatedSide.name }
                                    Severity: Major
                                    Found in core/sync/index.js - About 30 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language