camelCaseDave/xrm-mock

View on GitHub

Showing 75 of 86 total issues

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

  public getSelectedRows(): Xrm.Collection.ItemCollection<Xrm.Controls.Grid.GridRow> {
    return this.selectedRows;
  }
Severity: Minor
Found in src/xrm-mock/controls/grid/grid.mock.ts and 1 other location - About 35 mins to fix
src/xrm-mock/controls/grid/grid.mock.ts on lines 10..12

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

export class MobileMock implements Xrm.Mobile {
    public offline: Xrm.MobileOffline;

    constructor(offline: Xrm.MobileOffline) {
        this.offline = offline;
Severity: Minor
Found in src/xrm-mock/mobile/mobile.mock.ts and 1 other location - About 35 mins to fix
src/xrm-mock/async/openquickcreatesuccesscallbackobject/openquickcreatesuccesscallbackobject.mock.ts on lines 1..7

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

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

export class OpenQuickCreateSuccessCallbackObjectMock implements Xrm.Async.OpenQuickCreateSuccessCallbackObject {
    public savedEntityReference: Xrm.LookupValue;

    constructor(savedEntityReference: Xrm.LookupValue) {
        this.savedEntityReference = savedEntityReference;
src/xrm-mock/mobile/mobile.mock.ts on lines 1..7

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

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

    public getFormat(): Xrm.Attributes.OptionSetAttributeFormat {
        return super.getFormat() as Xrm.Attributes.OptionSetAttributeFormat;
    }
src/xrm-mock/attributes/dateattribute/dateattribute.mock.ts on lines 22..24
src/xrm-mock/attributes/numberattribute/numberattribute.mock.ts on lines 29..31
src/xrm-mock/attributes/stringattribute/stringattribute.mock.ts on lines 26..28

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

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

    public getFormat(): Xrm.Attributes.IntegerAttributeFormat {
        return super.getFormat() as Xrm.Attributes.IntegerAttributeFormat;
    }
src/xrm-mock/attributes/dateattribute/dateattribute.mock.ts on lines 22..24
src/xrm-mock/attributes/optionsetattribute/optionsetattribute.mock.ts on lines 36..38
src/xrm-mock/attributes/stringattribute/stringattribute.mock.ts on lines 26..28

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

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

    public getFormat(): Xrm.Attributes.DateAttributeFormat {
        return super.getFormat() as Xrm.Attributes.DateAttributeFormat;
    }
Severity: Major
Found in src/xrm-mock/attributes/dateattribute/dateattribute.mock.ts and 3 other locations - About 35 mins to fix
src/xrm-mock/attributes/numberattribute/numberattribute.mock.ts on lines 29..31
src/xrm-mock/attributes/optionsetattribute/optionsetattribute.mock.ts on lines 36..38
src/xrm-mock/attributes/stringattribute/stringattribute.mock.ts on lines 26..28

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

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

    public getFormat(): Xrm.Attributes.StringAttributeFormat {
        return super.getFormat() as Xrm.Attributes.StringAttributeFormat;
    }
src/xrm-mock/attributes/dateattribute/dateattribute.mock.ts on lines 22..24
src/xrm-mock/attributes/numberattribute/numberattribute.mock.ts on lines 29..31
src/xrm-mock/attributes/optionsetattribute/optionsetattribute.mock.ts on lines 36..38

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

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

    constructor(components: IDateControlComponents) {
        super(DateControlMock.defaultComponents(components));
        this.showTime = components.showTime;
    }
Severity: Minor
Found in src/xrm-mock/controls/datecontrol/datecontrol.mock.ts and 1 other location - About 30 mins to fix
src/xrm-mock/attributes/lookupattribute/lookupattribute.mock.ts on lines 16..19

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

  public createDate(attribute: XrmMock.DateAttributeMock,
                    name?: string,
                    visible?: boolean,
                    disabled?: boolean,
                    label?: string): XrmMock.DateControlMock;
Severity: Major
Found in src/xrm-mock-generator/control.ts and 5 other locations - About 30 mins to fix
src/xrm-mock-generator/control.ts on lines 9..12
src/xrm-mock-generator/control.ts on lines 60..64
src/xrm-mock-generator/control.ts on lines 77..81
src/xrm-mock-generator/control.ts on lines 94..98
src/xrm-mock-generator/control.ts on lines 111..114

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

  public createString(attribute: XrmMock.StringAttributeMock,
                      name?: string,
                      visible?: boolean,
                      disabled?: boolean, label?: string): XrmMock.StringControlMock;
Severity: Major
Found in src/xrm-mock-generator/control.ts and 5 other locations - About 30 mins to fix
src/xrm-mock-generator/control.ts on lines 9..12
src/xrm-mock-generator/control.ts on lines 25..29
src/xrm-mock-generator/control.ts on lines 60..64
src/xrm-mock-generator/control.ts on lines 77..81
src/xrm-mock-generator/control.ts on lines 94..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 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

  public createLookup(attribute: XrmMock.LookupAttributeMock,
                      name?: string,
                      visible?: boolean,
                      disabled?: boolean,
                      label?: string): XrmMock.LookupControlMock;
Severity: Major
Found in src/xrm-mock-generator/control.ts and 5 other locations - About 30 mins to fix
src/xrm-mock-generator/control.ts on lines 9..12
src/xrm-mock-generator/control.ts on lines 25..29
src/xrm-mock-generator/control.ts on lines 77..81
src/xrm-mock-generator/control.ts on lines 94..98
src/xrm-mock-generator/control.ts on lines 111..114

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

    constructor(components: ILookupAttributeComponents) {
        super(LookupAttributeMock.defaultComponents(components));
        this.isPartyList = components.isPartyList;
    }
Severity: Minor
Found in src/xrm-mock/attributes/lookupattribute/lookupattribute.mock.ts and 1 other location - About 30 mins to fix
src/xrm-mock/controls/datecontrol/datecontrol.mock.ts 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 6 locations. Consider refactoring.
Open

  public createBoolean(attribute: XrmMock.BooleanAttributeMock,
                       name?: string,
                       visible?: boolean,
                       disabled?: boolean, label?: string): XrmMock.BooleanControlMock;
Severity: Major
Found in src/xrm-mock-generator/control.ts and 5 other locations - About 30 mins to fix
src/xrm-mock-generator/control.ts on lines 25..29
src/xrm-mock-generator/control.ts on lines 60..64
src/xrm-mock-generator/control.ts on lines 77..81
src/xrm-mock-generator/control.ts on lines 94..98
src/xrm-mock-generator/control.ts on lines 111..114

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

  public createOptionSet(attribute: XrmMock.OptionSetAttributeMock,
                         name?: string,
                         visible?: boolean,
                         disabled?: boolean,
                         label?: string): XrmMock.OptionSetControlMock;
Severity: Major
Found in src/xrm-mock-generator/control.ts and 5 other locations - About 30 mins to fix
src/xrm-mock-generator/control.ts on lines 9..12
src/xrm-mock-generator/control.ts on lines 25..29
src/xrm-mock-generator/control.ts on lines 60..64
src/xrm-mock-generator/control.ts on lines 77..81
src/xrm-mock-generator/control.ts on lines 111..114

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

  public createNumber(attribute: XrmMock.NumberAttributeMock,
                      name?: string,
                      visible?: boolean,
                      disabled?: boolean,
                      label?: string): XrmMock.NumberControlMock;
Severity: Major
Found in src/xrm-mock-generator/control.ts and 5 other locations - About 30 mins to fix
src/xrm-mock-generator/control.ts on lines 9..12
src/xrm-mock-generator/control.ts on lines 25..29
src/xrm-mock-generator/control.ts on lines 60..64
src/xrm-mock-generator/control.ts on lines 94..98
src/xrm-mock-generator/control.ts on lines 111..114

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

Severity
Category
Status
Source
Language