denniss17/pimatic-angular-material-frontend

View on GitHub

Showing 43 of 43 total issues

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

                this.socket.on('deviceRemoved', function (device) {
                    $log.debug('websocketApi', 'deviceRemoved', device);
                    self.apply(function () {
                        store.remove('devices', device, true);
                    });
Severity: Major
Found in app/adapters/websocketAdapter.js and 9 other locations - About 1 hr to fix
app/adapters/websocketAdapter.js on lines 202..207
app/adapters/websocketAdapter.js on lines 219..224
app/adapters/websocketAdapter.js on lines 225..230
app/adapters/websocketAdapter.js on lines 243..248
app/adapters/websocketAdapter.js on lines 249..254
app/adapters/websocketAdapter.js on lines 267..272
app/adapters/websocketAdapter.js on lines 273..278
app/adapters/websocketAdapter.js on lines 290..295
app/adapters/websocketAdapter.js on lines 296..301

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

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

                this.socket.on('groupAdded', function (group) {
                    $log.debug('websocketApi', 'groupAdded', group);
                    self.apply(function () {
                        store.add('groups', group, true);
                    });
Severity: Major
Found in app/adapters/websocketAdapter.js and 9 other locations - About 1 hr to fix
app/adapters/websocketAdapter.js on lines 196..201
app/adapters/websocketAdapter.js on lines 202..207
app/adapters/websocketAdapter.js on lines 219..224
app/adapters/websocketAdapter.js on lines 225..230
app/adapters/websocketAdapter.js on lines 243..248
app/adapters/websocketAdapter.js on lines 267..272
app/adapters/websocketAdapter.js on lines 273..278
app/adapters/websocketAdapter.js on lines 290..295
app/adapters/websocketAdapter.js on lines 296..301

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

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

                this.socket.on('pageRemoved', function (page) {
                    $log.debug('websocketApi', 'pageRemoved', page);
                    self.apply(function () {
                        store.remove('pages', page, true);
                    });
Severity: Major
Found in app/adapters/websocketAdapter.js and 9 other locations - About 1 hr to fix
app/adapters/websocketAdapter.js on lines 196..201
app/adapters/websocketAdapter.js on lines 202..207
app/adapters/websocketAdapter.js on lines 225..230
app/adapters/websocketAdapter.js on lines 243..248
app/adapters/websocketAdapter.js on lines 249..254
app/adapters/websocketAdapter.js on lines 267..272
app/adapters/websocketAdapter.js on lines 273..278
app/adapters/websocketAdapter.js on lines 290..295
app/adapters/websocketAdapter.js on lines 296..301

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

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

                this.socket.on('ruleRemoved', function (rule) {
                    $log.debug('websocketApi', 'ruleRemoved', rule);
                    self.apply(function () {
                        store.remove('rules', rule, true);
                    });
Severity: Major
Found in app/adapters/websocketAdapter.js and 9 other locations - About 1 hr to fix
app/adapters/websocketAdapter.js on lines 196..201
app/adapters/websocketAdapter.js on lines 202..207
app/adapters/websocketAdapter.js on lines 219..224
app/adapters/websocketAdapter.js on lines 225..230
app/adapters/websocketAdapter.js on lines 243..248
app/adapters/websocketAdapter.js on lines 249..254
app/adapters/websocketAdapter.js on lines 267..272
app/adapters/websocketAdapter.js on lines 290..295
app/adapters/websocketAdapter.js on lines 296..301

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

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

                this.socket.on('pageAdded', function (page) {
                    $log.debug('websocketApi', 'pageAdded', page);
                    self.apply(function () {
                        store.add('pages', page, true);
                    });
Severity: Major
Found in app/adapters/websocketAdapter.js and 9 other locations - About 1 hr to fix
app/adapters/websocketAdapter.js on lines 196..201
app/adapters/websocketAdapter.js on lines 202..207
app/adapters/websocketAdapter.js on lines 219..224
app/adapters/websocketAdapter.js on lines 243..248
app/adapters/websocketAdapter.js on lines 249..254
app/adapters/websocketAdapter.js on lines 267..272
app/adapters/websocketAdapter.js on lines 273..278
app/adapters/websocketAdapter.js on lines 290..295
app/adapters/websocketAdapter.js on lines 296..301

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

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

                this.socket.on('ruleAdded', function (rule) {
                    $log.debug('websocketApi', 'ruleAdded', rule);
                    self.apply(function () {
                        store.add('rules', rule, true);
                    });
Severity: Major
Found in app/adapters/websocketAdapter.js and 9 other locations - About 1 hr to fix
app/adapters/websocketAdapter.js on lines 196..201
app/adapters/websocketAdapter.js on lines 202..207
app/adapters/websocketAdapter.js on lines 219..224
app/adapters/websocketAdapter.js on lines 225..230
app/adapters/websocketAdapter.js on lines 243..248
app/adapters/websocketAdapter.js on lines 249..254
app/adapters/websocketAdapter.js on lines 273..278
app/adapters/websocketAdapter.js on lines 290..295
app/adapters/websocketAdapter.js on lines 296..301

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

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

                this.socket.on('groupRemoved', function (group) {
                    $log.debug('websocketApi', 'groupRemoved', group);
                    self.apply(function () {
                        store.remove('groups', group, true);
                    });
Severity: Major
Found in app/adapters/websocketAdapter.js and 9 other locations - About 1 hr to fix
app/adapters/websocketAdapter.js on lines 196..201
app/adapters/websocketAdapter.js on lines 202..207
app/adapters/websocketAdapter.js on lines 219..224
app/adapters/websocketAdapter.js on lines 225..230
app/adapters/websocketAdapter.js on lines 249..254
app/adapters/websocketAdapter.js on lines 267..272
app/adapters/websocketAdapter.js on lines 273..278
app/adapters/websocketAdapter.js on lines 290..295
app/adapters/websocketAdapter.js on lines 296..301

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

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

                this.socket.on('variableRemoved', function (variable) {
                    $log.debug('websocketApi', 'variableRemoved', variable);
                    self.apply(function () {
                        store.remove('variables', variable, true);
                    });
Severity: Major
Found in app/adapters/websocketAdapter.js and 9 other locations - About 1 hr to fix
app/adapters/websocketAdapter.js on lines 196..201
app/adapters/websocketAdapter.js on lines 202..207
app/adapters/websocketAdapter.js on lines 219..224
app/adapters/websocketAdapter.js on lines 225..230
app/adapters/websocketAdapter.js on lines 243..248
app/adapters/websocketAdapter.js on lines 249..254
app/adapters/websocketAdapter.js on lines 267..272
app/adapters/websocketAdapter.js on lines 273..278
app/adapters/websocketAdapter.js on lines 290..295

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

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

                this.socket.on('deviceAdded', function (device) {
                    $log.debug('websocketApi', 'deviceAdded', device);
                    self.apply(function () {
                        store.add('devices', device, true);
                    });
Severity: Major
Found in app/adapters/websocketAdapter.js and 9 other locations - About 1 hr to fix
app/adapters/websocketAdapter.js on lines 196..201
app/adapters/websocketAdapter.js on lines 219..224
app/adapters/websocketAdapter.js on lines 225..230
app/adapters/websocketAdapter.js on lines 243..248
app/adapters/websocketAdapter.js on lines 249..254
app/adapters/websocketAdapter.js on lines 267..272
app/adapters/websocketAdapter.js on lines 273..278
app/adapters/websocketAdapter.js on lines 290..295
app/adapters/websocketAdapter.js on lines 296..301

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

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

                this.socket.on('variableAdded', function (variable) {
                    $log.debug('websocketApi', 'variableAdded', variable);
                    self.apply(function () {
                        store.add('variables', variable, true);
                    });
Severity: Major
Found in app/adapters/websocketAdapter.js and 9 other locations - About 1 hr to fix
app/adapters/websocketAdapter.js on lines 196..201
app/adapters/websocketAdapter.js on lines 202..207
app/adapters/websocketAdapter.js on lines 219..224
app/adapters/websocketAdapter.js on lines 225..230
app/adapters/websocketAdapter.js on lines 243..248
app/adapters/websocketAdapter.js on lines 249..254
app/adapters/websocketAdapter.js on lines 267..272
app/adapters/websocketAdapter.js on lines 273..278
app/adapters/websocketAdapter.js on lines 296..301

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

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

module.exports = function (config) {
    config.set({

        // base path that will be used to resolve all patterns (eg. files, exclude)
        basePath: '',
Severity: Minor
Found in karma.conf.js - About 1 hr to fix

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

                    $http.get('assets/fixtures/variables.json').then(function (response) {
                        self.addData('variables', response.data);
                    }, function () {
                        self.addData('variables', []);
                    });
    Severity: Major
    Found in app/adapters/fixtureAdapter.js and 3 other locations - About 1 hr to fix
    app/adapters/fixtureAdapter.js on lines 46..50
    app/adapters/fixtureAdapter.js on lines 51..55
    app/adapters/fixtureAdapter.js on lines 56..60

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

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

                    $http.get('assets/fixtures/rules.json').then(function (response) {
                        self.addData('rules', response.data);
                    }, function () {
                        self.addData('rules', []);
                    });
    Severity: Major
    Found in app/adapters/fixtureAdapter.js and 3 other locations - About 1 hr to fix
    app/adapters/fixtureAdapter.js on lines 46..50
    app/adapters/fixtureAdapter.js on lines 51..55
    app/adapters/fixtureAdapter.js on lines 61..65

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

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

                    $http.get('assets/fixtures/pages.json').then(function (response) {
                        self.addData('pages', response.data);
                    }, function () {
                        self.addData('pages', []);
                    });
    Severity: Major
    Found in app/adapters/fixtureAdapter.js and 3 other locations - About 1 hr to fix
    app/adapters/fixtureAdapter.js on lines 46..50
    app/adapters/fixtureAdapter.js on lines 56..60
    app/adapters/fixtureAdapter.js on lines 61..65

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

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

                    $http.get('assets/fixtures/groups.json').then(function (response) {
                        self.addData('groups', response.data);
                    }, function () {
                        self.addData('groups', []);
                    });
    Severity: Major
    Found in app/adapters/fixtureAdapter.js and 3 other locations - About 1 hr to fix
    app/adapters/fixtureAdapter.js on lines 51..55
    app/adapters/fixtureAdapter.js on lines 56..60
    app/adapters/fixtureAdapter.js on lines 61..65

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

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

            get: function (type, id, skipApi) {
                var self = this;
                var item;
                var date;
    
    
    Severity: Minor
    Found in app/services/store.js - About 1 hr to fix

      Function add has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              add: function (type, object, skipApi) {
                  var adapter = this.adapter;
                  var self = this;
                  var add;
      
      
      Severity: Minor
      Found in app/services/store.js - About 1 hr to fix

        Function remove has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                remove: function (type, object, skipApi) {
                    var self = this;
                    var remove;
        
                    this.$log.debug('store', 'remove()', 'type=', type, 'object=', object, 'skipApi=', skipApi);
        Severity: Minor
        Found in app/services/store.js - About 1 hr to fix

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

                          this.socket.on('variables', function (variables) {
                              $log.debug('websocketApi', 'variables', variables);
                              self.handleIncomingData('variables', variables);
                          });
          Severity: Minor
          Found in app/adapters/websocketAdapter.js and 2 other locations - About 35 mins to fix
          app/adapters/websocketAdapter.js on lines 142..145
          app/adapters/websocketAdapter.js on lines 152..155

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

          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

                          this.socket.on('rules', function (rules) {
                              $log.debug('websocketApi', 'rules', rules);
                              self.handleIncomingData('rules', rules);
                          });
          Severity: Minor
          Found in app/adapters/websocketAdapter.js and 2 other locations - About 35 mins to fix
          app/adapters/websocketAdapter.js on lines 147..150
          app/adapters/websocketAdapter.js on lines 152..155

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

          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

          Severity
          Category
          Status
          Source
          Language