wikimedia/mediawiki-core

View on GitHub
resources/src/mediawiki.debug/debug.js

Summary

Maintainability
B
5 hrs
Test Coverage

Function buildHtml has 81 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        buildHtml: function () {
            let $container, $bits, panes, paneId, gitInfoText, $gitInfo;

            $container = $( '<div>' )
                .attr( {
Severity: Major
Found in resources/src/mediawiki.debug/debug.js - About 3 hrs to fix

    Function buildConsoleTable has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            buildConsoleTable: function () {
                let $table, entryTypeText, i, length, entry;
    
                $table = $( '<table>' ).attr( 'id', 'mw-debug-console' );
                length = this.data.log.length;
    Severity: Minor
    Found in resources/src/mediawiki.debug/debug.js - About 1 hr to fix

      Function switchPane has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              switchPane: function ( e ) {
                  let currentPaneId = debug.$container.data( 'currentPane' ),
                      requestedPaneId = $( this ).prop( 'id' ).slice( 9 ),
                      $currentPane = $( '#mw-debug-pane-' + currentPaneId ),
                      $requestedPane = $( '#mw-debug-pane-' + requestedPaneId ),
      Severity: Minor
      Found in resources/src/mediawiki.debug/debug.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status