fga-eps-mds/2019.1-unbrake

View on GitHub

Showing 321 of 321 total issues

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

class CalibrationCommand(models.Model):
    '''
        This class has command calibration information.
        commandChanelSpeed is CHVC in the file,
        actualSpeed is CUVC in the file,
Severity: Major
Found in unbrake-api/calibration/models.py and 1 other location - About 3 hrs to fix
unbrake-api/calibration/models.py on lines 40..55

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

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

describe("<Vibration />", () => {
  const context = React.createContext();
  const store = createStore(reducers);
  const wrapper = shallow(
    <Provider context={context} store={store}>
Severity: Major
Found in unbrake-frontend/src/tests/Calibration/Vibration.test.jsx and 9 other locations - About 3 hrs to fix
unbrake-frontend/src/tests/Calibration/Command.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Force.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Relation.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Speed.test.jsx on lines 12..21
unbrake-frontend/src/tests/Login.test.jsx on lines 12..22
unbrake-frontend/src/tests/testModule/AquisitionsAndCommand.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TabMenuComponent.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TestComponent.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TestData.test.jsx on lines 12..21

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

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

describe("<Login />", () => {
  const context = React.createContext();
  const store = createStore(reducers);
  const wrapper = shallow(
    <Provider context={context} store={store}>
Severity: Major
Found in unbrake-frontend/src/tests/Login.test.jsx and 9 other locations - About 3 hrs to fix
unbrake-frontend/src/tests/Calibration/Command.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Force.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Relation.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Speed.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Vibration.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/AquisitionsAndCommand.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TabMenuComponent.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TestComponent.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TestData.test.jsx on lines 12..21

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

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

describe("<Command />", () => {
  const context = React.createContext();
  const store = createStore(reducers);
  const wrapper = shallow(
    <Provider context={context} store={store}>
Severity: Major
Found in unbrake-frontend/src/tests/Calibration/Command.test.jsx and 9 other locations - About 3 hrs to fix
unbrake-frontend/src/tests/Calibration/Force.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Relation.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Speed.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Vibration.test.jsx on lines 12..21
unbrake-frontend/src/tests/Login.test.jsx on lines 12..22
unbrake-frontend/src/tests/testModule/AquisitionsAndCommand.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TabMenuComponent.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TestComponent.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TestData.test.jsx on lines 12..21

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

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

describe("<Speed />", () => {
  const context = React.createContext();
  const store = createStore(reducers);
  const wrapper = shallow(
    <Provider context={context} store={store}>
Severity: Major
Found in unbrake-frontend/src/tests/Calibration/Speed.test.jsx and 9 other locations - About 3 hrs to fix
unbrake-frontend/src/tests/Calibration/Command.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Force.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Relation.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Vibration.test.jsx on lines 12..21
unbrake-frontend/src/tests/Login.test.jsx on lines 12..22
unbrake-frontend/src/tests/testModule/AquisitionsAndCommand.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TabMenuComponent.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TestComponent.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TestData.test.jsx on lines 12..21

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

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

describe("<Test />", () => {
  const context = React.createContext();
  const store = createStore(reducers);
  const wrapper = shallow(
    <Provider context={context} store={store}>
unbrake-frontend/src/tests/Calibration/Command.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Force.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Relation.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Speed.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Vibration.test.jsx on lines 12..21
unbrake-frontend/src/tests/Login.test.jsx on lines 12..22
unbrake-frontend/src/tests/testModule/AquisitionsAndCommand.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TabMenuComponent.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TestData.test.jsx on lines 12..21

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

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

describe("<Relation />", () => {
  const context = React.createContext();
  const store = createStore(reducers);
  const wrapper = shallow(
    <Provider context={context} store={store}>
Severity: Major
Found in unbrake-frontend/src/tests/Calibration/Relation.test.jsx and 9 other locations - About 3 hrs to fix
unbrake-frontend/src/tests/Calibration/Command.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Force.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Speed.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Vibration.test.jsx on lines 12..21
unbrake-frontend/src/tests/Login.test.jsx on lines 12..22
unbrake-frontend/src/tests/testModule/AquisitionsAndCommand.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TabMenuComponent.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TestComponent.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TestData.test.jsx on lines 12..21

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

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

describe("<Force />", () => {
  const context = React.createContext();
  const store = createStore(reducers);
  const wrapper = shallow(
    <Provider context={context} store={store}>
Severity: Major
Found in unbrake-frontend/src/tests/Calibration/Force.test.jsx and 9 other locations - About 3 hrs to fix
unbrake-frontend/src/tests/Calibration/Command.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Relation.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Speed.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Vibration.test.jsx on lines 12..21
unbrake-frontend/src/tests/Login.test.jsx on lines 12..22
unbrake-frontend/src/tests/testModule/AquisitionsAndCommand.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TabMenuComponent.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TestComponent.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TestData.test.jsx on lines 12..21

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

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

describe("<AquisitionsAndCommand />", () => {
  const context = React.createContext();
  const store = createStore(reducers);
  const wrapper = shallow(
    <Provider context={context} store={store}>
unbrake-frontend/src/tests/Calibration/Command.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Force.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Relation.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Speed.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Vibration.test.jsx on lines 12..21
unbrake-frontend/src/tests/Login.test.jsx on lines 12..22
unbrake-frontend/src/tests/testModule/TabMenuComponent.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TestComponent.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TestData.test.jsx on lines 12..21

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

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

describe("<TabMenuComponent />", () => {
  const context = React.createContext();
  const store = createStore(reducers);
  const wrapper = shallow(
    <Provider context={context} store={store}>
unbrake-frontend/src/tests/Calibration/Command.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Force.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Relation.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Speed.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Vibration.test.jsx on lines 12..21
unbrake-frontend/src/tests/Login.test.jsx on lines 12..22
unbrake-frontend/src/tests/testModule/AquisitionsAndCommand.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TestComponent.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TestData.test.jsx on lines 12..21

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

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

describe("<TestData />", () => {
  const context = React.createContext();
  const store = createStore(reducers);
  const wrapper = shallow(
    <Provider context={context} store={store}>
Severity: Major
Found in unbrake-frontend/src/tests/testModule/TestData.test.jsx and 9 other locations - About 3 hrs to fix
unbrake-frontend/src/tests/Calibration/Command.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Force.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Relation.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Speed.test.jsx on lines 12..21
unbrake-frontend/src/tests/Calibration/Vibration.test.jsx on lines 12..21
unbrake-frontend/src/tests/Login.test.jsx on lines 12..22
unbrake-frontend/src/tests/testModule/AquisitionsAndCommand.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TabMenuComponent.test.jsx on lines 12..21
unbrake-frontend/src/tests/testModule/TestComponent.test.jsx on lines 12..21

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

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

    calibration_command = graphene.Field(
        CalibrationCommandType,
        id=graphene.ID(),
        command_chanel_speed=graphene.Int(),
        actual_speed=graphene.Float(),
Severity: Major
Found in unbrake-api/calibration/schema.py and 1 other location - About 2 hrs to fix
unbrake-api/calibration/schema.py on lines 137..145

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

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

    calibration_relations = graphene.Field(
        CalibrationRelationsType,
        id=graphene.ID(),
        transversal_selection_width=graphene.Int(),
        height_width_relation=graphene.Int(),
Severity: Major
Found in unbrake-api/calibration/schema.py and 1 other location - About 2 hrs to fix
unbrake-api/calibration/schema.py on lines 158..166

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

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

class CalibrationForce(models.Model):
    '''
        This class has force calibration information.
        This class is used twice per calibration.
        acquisitionTemp is CNHF in the file,
Severity: Major
Found in unbrake-api/calibration/models.py and 1 other location - About 2 hrs to fix
unbrake-api/calibration/models.py on lines 93..104

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

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

class CalibrationTemperature(models.Model):
    '''
        This class has temperature calibration information.
        This class is used twice per calibration.
        acqusitonTemp is CTH in the file,
Severity: Major
Found in unbrake-api/calibration/models.py and 1 other location - About 2 hrs to fix
unbrake-api/calibration/models.py on lines 110..122

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

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

      <TextField
        select
        label="Configurações"
        value={states.configId}
        name="configId"
Severity: Major
Found in unbrake-frontend/src/testModule/General.jsx and 1 other location - About 2 hrs to fix
unbrake-frontend/src/testModule/General.jsx on lines 73..85

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

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

      aquisition: {
        Tc1: "", // Temperatura 1(ºC)
        Tc2: "", // Temperatura 2(ºC)
        Fkgf1: "", // Força 1 (kfg)
        Fkgf2: "", // Força 2 (kfg)
Severity: Major
Found in unbrake-frontend/src/testModule/AquisitionsAndCommand.jsx and 1 other location - About 2 hrs to fix
unbrake-frontend/src/testModule/TestComponent.jsx on lines 16..30

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

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

        aquisition: {
          Tc1: "", // Temperatura 1(ºC)
          Tc2: "", // Temperatura 2(ºC)
          Fkgf1: "", // Força 1 (kfg)
          Fkgf2: "", // Força 2 (kfg)
Severity: Major
Found in unbrake-frontend/src/testModule/TestComponent.jsx and 1 other location - About 2 hrs to fix
unbrake-frontend/src/testModule/AquisitionsAndCommand.jsx on lines 181..195

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

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

      <TextField
        select
        label="Calibrações"
        value={states.calibId}
        name="calibId"
Severity: Major
Found in unbrake-frontend/src/testModule/General.jsx and 1 other location - About 2 hrs to fix
unbrake-frontend/src/testModule/General.jsx on lines 86..98

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

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 onReady has a Cognitive Complexity of 33 (exceeds 20 allowed). Consider refactoring.
Open

func onReady() {
    systray.SetIcon(IconDisabled)
    systray.SetTitle("UnBrake")
    systray.SetTooltip("UnBrake")

Severity: Minor
Found in unbrake-local/unbrake.go - About 2 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Severity
Category
Status
Source
Language