azukiapp/azk

View on GitHub
src/sync/watcher.js

Summary

Maintainability
B
4 hrs
Test Coverage

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

  watch(origin, destination, opts) {
    var id = this.calculate_id(origin, destination);

    let promise = defer((resolve, reject) => {
      log.info('[sync] Adding watcher, from: %s, to: %s, opts: %j', origin, destination, opts, {});
Severity: Major
Found in src/sync/watcher.js - About 2 hrs to fix

    Function promise has 58 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        let promise = defer((resolve, reject) => {
          log.info('[sync] Adding watcher, from: %s, to: %s, opts: %j', origin, destination, opts, {});
          if (this.workers[id]) {
            this.workers[id].count++;
            this.publish('init', { status: 'exists' });
    Severity: Major
    Found in src/sync/watcher.js - About 2 hrs to fix

      There are no issues that match your filters.

      Category
      Status