wikimedia/mediawiki-extensions-VisualEditor

View on GitHub

Showing 469 of 907 total issues

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

ve.ui.MWLanguageVariantOneWayInspector.prototype.initialize = function () {
    ve.ui.MWLanguageVariantOneWayInspector.super.prototype.initialize.call( this );
    this.items = [];
    this.layout = new OO.ui.FieldsetLayout( { } );
    this.form.$element.append( this.layout.$element );
modules/ve-mw/ui/inspectors/ve.ui.MWLanguageVariantInspector.js on lines 558..572

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

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

ve.ui.MWLanguageVariantTwoWayInspector.prototype.initialize = function () {
    ve.ui.MWLanguageVariantTwoWayInspector.super.prototype.initialize.call( this );
    this.items = [];
    this.layout = new OO.ui.FieldsetLayout( { } );
    this.form.$element.append( this.layout.$element );
modules/ve-mw/ui/inspectors/ve.ui.MWLanguageVariantInspector.js on lines 705..719

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

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

    if ( this.tableOfContentsTouched ) {
        if ( newTableOfContentsData.data === 'default' ) {
            if ( currentTableOfContents ) {
                this.fragment.removeMeta( currentTableOfContents );
            }
Severity: Major
Found in modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js and 2 other locations - About 6 hrs to fix
modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js on lines 256..273
modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js on lines 280..297

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

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

    if ( this.indexingOptionTouched ) {
        if ( newIndexingData.data === 'default' ) {
            if ( currentIndexingItem ) {
                this.fragment.removeMeta( currentIndexingItem );
            }
Severity: Major
Found in modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js and 2 other locations - About 6 hrs to fix
modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js on lines 280..297
modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js on lines 347..364

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

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

    if ( this.newSectionEditLinkOptionTouched ) {
        if ( newNewSectionEditLinkData.data === 'default' ) {
            if ( currentNewSectionEditLinkItem ) {
                this.fragment.removeMeta( currentNewSectionEditLinkItem );
            }
Severity: Major
Found in modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js and 2 other locations - About 6 hrs to fix
modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js on lines 256..273
modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js on lines 347..364

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

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

    citoidInspectorReuse: function () {
        const done = arguments[ arguments.length - 1 ],
            surface = ve.init.target.surface;
        surface.context.inspectors.currentWindow.setModePanel( 'reuse' );
        setTimeout( () => {
Severity: Major
Found in build/screenshots-client/userGuide.js and 1 other location - About 5 hrs to fix
build/screenshots-client/userGuide.js on lines 39..51

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

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

    citoidInspectorManual: function () {
        const done = arguments[ arguments.length - 1 ],
            surface = ve.init.target.surface;
        surface.context.inspectors.currentWindow.setModePanel( 'manual' );
        setTimeout( () => {
Severity: Major
Found in build/screenshots-client/userGuide.js and 1 other location - About 5 hrs to fix
build/screenshots-client/userGuide.js on lines 52..64

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

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

        new OO.ui.ButtonSelectWidget()
            .addItems( [
                new OO.ui.ButtonOptionWidget( {
                    data: 'mw:PageProp/index',
                    label: ve.msg( 'visualeditor-dialog-meta-settings-index-force' )
Severity: Major
Found in modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js and 1 other location - About 4 hrs to fix
modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js on lines 63..78

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

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

        new OO.ui.ButtonSelectWidget()
            .addItems( [
                new OO.ui.ButtonOptionWidget( {
                    data: 'mw:PageProp/newsectionlink',
                    label: ve.msg( 'visualeditor-dialog-meta-settings-newsectioneditlink-force' )
Severity: Major
Found in modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js and 1 other location - About 4 hrs to fix
modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js on lines 37..52

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

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

    this.metaItemCheckboxes.forEach( ( metaItemCheckbox ) => {
        const currentItem = this.getMetaItem( metaItemCheckbox.metaName ),
            isSelected = metaItemCheckbox.fieldLayout.getField().isSelected();

        if ( currentItem && !isSelected ) {
Severity: Major
Found in modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js and 1 other location - About 4 hrs to fix
modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js on lines 400..409

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

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

    if ( APIinfo ) {
        this.scalable.setOriginalDimensions( {
            width: APIinfo.width,
            height: APIinfo.height
        } );
Severity: Major
Found in modules/ve-mw/dm/models/ve.dm.MWImageModel.js and 1 other location - About 4 hrs to fix
modules/ve-mw/dm/models/ve.dm.MWImageModel.js on lines 341..358

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

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

            ve.dm.MWImageNode.static.getScalablePromise( this.getFilename() ).done( ( info ) => {
                this.scalable.setOriginalDimensions( {
                    width: info.width,
                    height: info.height
                } );
Severity: Major
Found in modules/ve-mw/dm/models/ve.dm.MWImageModel.js and 1 other location - About 4 hrs to fix
modules/ve-mw/dm/models/ve.dm.MWImageModel.js on lines 320..337

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

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

    this.metaItemCheckboxes.forEach( ( metaItemCheckbox ) => {
        const currentItem = this.getMetaItem( metaItemCheckbox.metaName ),
            isSelected = metaItemCheckbox.fieldLayout.getField().isSelected();

        if ( currentItem && !isSelected ) {
Severity: Major
Found in modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js and 1 other location - About 4 hrs to fix
modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js on lines 334..343

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

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

        if ( currentRedirectTargetItem ) {
            if ( newRedirectData ) {
                if ( currentRedirectTargetItem.getAttribute( 'title' ) !== newRedirectData ) {
                    // There was a redirect and is a new one, but they differ, so replace
                    this.fragment.replaceMeta(
Severity: Major
Found in modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js and 1 other location - About 4 hrs to fix
modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js on lines 309..331

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

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

        if ( currentDisplayTitleItem ) {
            if ( newDisplayTitle ) {
                if ( currentDisplayTitleItem.getAttribute( 'content' ) !== newDisplayTitle ) {
                    // There was a display title and is a new one, but they differ, so replace
                    this.fragment.replaceMeta(
Severity: Major
Found in modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js and 1 other location - About 4 hrs to fix
modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js on lines 368..390

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

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

ve.ui.MWExtensionDialog.prototype.getTeardownProcess = function ( data ) {
    data = data || {};
    // Parent process
    const process = ve.ui.MWExtensionDialog.super.prototype.getTeardownProcess.call( this, data );
    // Mixin process
Severity: Major
Found in modules/ve-mw/ui/dialogs/ve.ui.MWExtensionDialog.js and 4 other locations - About 4 hrs to fix
modules/ve-mw/ui/dialogs/ve.ui.MWExtensionDialog.js on lines 52..58
modules/ve-mw/ui/dialogs/ve.ui.MWExtensionDialog.js on lines 63..69
modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js on lines 53..59
modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js on lines 78..84

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

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

ve.ui.MWExtensionInspector.prototype.getSetupProcess = function ( data ) {
    data = data || {};
    // Parent process
    const process = ve.ui.MWExtensionInspector.super.prototype.getSetupProcess.call( this, data );
    // Mixin process
Severity: Major
Found in modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js and 4 other locations - About 4 hrs to fix
modules/ve-mw/ui/dialogs/ve.ui.MWExtensionDialog.js on lines 52..58
modules/ve-mw/ui/dialogs/ve.ui.MWExtensionDialog.js on lines 63..69
modules/ve-mw/ui/dialogs/ve.ui.MWExtensionDialog.js on lines 74..80
modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js on lines 78..84

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

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

ve.ui.MWExtensionDialog.prototype.getSetupProcess = function ( data ) {
    data = data || {};
    // Parent process
    const process = ve.ui.MWExtensionDialog.super.prototype.getSetupProcess.call( this, data );
    // Mixin process
Severity: Major
Found in modules/ve-mw/ui/dialogs/ve.ui.MWExtensionDialog.js and 4 other locations - About 4 hrs to fix
modules/ve-mw/ui/dialogs/ve.ui.MWExtensionDialog.js on lines 63..69
modules/ve-mw/ui/dialogs/ve.ui.MWExtensionDialog.js on lines 74..80
modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js on lines 53..59
modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js on lines 78..84

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

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

ve.ui.MWExtensionInspector.prototype.getTeardownProcess = function ( data ) {
    data = data || {};
    // Parent process
    const process = ve.ui.MWExtensionInspector.super.prototype.getTeardownProcess.call( this, data );
    // Mixin process
Severity: Major
Found in modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js and 4 other locations - About 4 hrs to fix
modules/ve-mw/ui/dialogs/ve.ui.MWExtensionDialog.js on lines 52..58
modules/ve-mw/ui/dialogs/ve.ui.MWExtensionDialog.js on lines 63..69
modules/ve-mw/ui/dialogs/ve.ui.MWExtensionDialog.js on lines 74..80
modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js on lines 53..59

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

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

ve.ui.MWExtensionDialog.prototype.getReadyProcess = function ( data ) {
    data = data || {};
    // Parent process
    const process = ve.ui.MWExtensionDialog.super.prototype.getReadyProcess.call( this, data );
    // Mixin process
Severity: Major
Found in modules/ve-mw/ui/dialogs/ve.ui.MWExtensionDialog.js and 4 other locations - About 4 hrs to fix
modules/ve-mw/ui/dialogs/ve.ui.MWExtensionDialog.js on lines 52..58
modules/ve-mw/ui/dialogs/ve.ui.MWExtensionDialog.js on lines 74..80
modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js on lines 53..59
modules/ve-mw/ui/inspectors/ve.ui.MWExtensionInspector.js on lines 78..84

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

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