jonpitch/danger-brewing

View on GitHub

Showing 132 of 132 total issues

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

test('it exists', function(assert) {
  let model = this.subject();
  // let store = this.store();
  assert.ok(!!model);
});
Severity: Minor
Found in tests/unit/models/pour-test.js and 1 other location - About 35 mins to fix
tests/unit/models/tap-test.js on lines 11..15

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

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

test('it exists', function(assert) {
  let model = this.subject();
  // let store = this.store();
  assert.ok(!!model);
});
Severity: Minor
Found in tests/unit/models/tap-test.js and 1 other location - About 35 mins to fix
tests/unit/models/pour-test.js on lines 10..14

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

    deleteSensor(sensor) {
      sensor.destroyRecord().catch(() => {
        // TODO notification
        console.log('unable to delete sensor');
      });
Severity: Minor
Found in app/components/hub-status.js and 1 other location - About 35 mins to fix
app/components/hub-status.js on lines 38..43

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

  run(() => {
    model.set('temperature', 100);
    assert.equal(model.get('temperatureFahrenheit'), 212, 'correct boiling conversion');
  });
Severity: Minor
Found in tests/unit/models/sensor-test.js and 2 other locations - About 30 mins to fix
tests/unit/models/sensor-test.js on lines 16..19
tests/unit/models/sensor-test.js on lines 26..29

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

  run(() => {
    model.set('temperature', 15);
    assert.equal(model.get('temperatureFahrenheit'), 59, 'correct conversion');
  });
Severity: Minor
Found in tests/unit/models/sensor-test.js and 2 other locations - About 30 mins to fix
tests/unit/models/sensor-test.js on lines 16..19
tests/unit/models/sensor-test.js on lines 21..24

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

  run(() => {
    model.set('temperature', 0);
    assert.equal(model.get('temperatureFahrenheit'), 32, 'correct freezing conversion');
  });
Severity: Minor
Found in tests/unit/models/sensor-test.js and 2 other locations - About 30 mins to fix
tests/unit/models/sensor-test.js on lines 21..24
tests/unit/models/sensor-test.js on lines 26..29

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

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import { test } from 'qunit';
Severity: Minor
Found in tests/acceptance/history-test.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import { moduleFor, test } from 'ember-qunit';
Severity: Minor
Found in tests/unit/routes/beer/add-test.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import Ember from 'ember';
Severity: Minor
Found in app/components/add-sensor.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import Ember from 'ember';
Severity: Minor
Found in app/router.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import Ember from 'ember';
Severity: Minor
Found in app/routes/login.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import { test } from 'qunit';
Severity: Minor
Found in tests/acceptance/index-test.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import Ember from 'ember';

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import Ember from 'ember';
Severity: Minor
Found in tests/unit/models/beer-test.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import { moduleForModel, test } from 'ember-qunit';
Severity: Minor
Found in tests/unit/models/tap-test.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import { moduleFor, test } from 'ember-qunit';
Severity: Minor
Found in tests/unit/routes/sensor/add-test.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import Model from 'ember-data/model';
Severity: Minor
Found in app/models/tap.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import Resolver from 'ember-resolver';
Severity: Minor
Found in app/resolver.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import { test } from 'qunit';
Severity: Minor
Found in tests/acceptance/add-beer-test.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import Ember from 'ember';
Severity: Minor
Found in app/app.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Severity
Category
Status
Source
Language