wikimedia/mediawiki-extensions-MobileFrontend

View on GitHub
src/mobile.startup/references/references.js

Summary

Maintainability
B
4 hrs
Test Coverage

Function referenceDrawer has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function referenceDrawer( props ) {
    const errorIcon = props.error ? new IconButton( {
        name: 'error',
        isSmall: true
    } ).$el : null;
Severity: Minor
Found in src/mobile.startup/references/references.js - About 2 hrs to fix

    Function showReference has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        showReference( id, page, refNumber, pageHTMLParser, gateway, props,
            onShowNestedReference
        ) {
            return gateway.getReference( id, page, pageHTMLParser ).then( ( reference ) => {
                const drawer = referenceDrawer( util.extend( {
    Severity: Minor
    Found in src/mobile.startup/references/references.js - About 1 hr to fix

      Function showReference has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          showReference( id, page, refNumber, pageHTMLParser, gateway, props,
              onShowNestedReference
      Severity: Major
      Found in src/mobile.startup/references/references.js - About 50 mins to fix

        There are no issues that match your filters.

        Category
        Status