wikimedia/mediawiki-core

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

Summary

Maintainability
C
1 day
Test Coverage

Function Notification has 59 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function Notification( message, options ) {
        var $notification, $notificationContent;

        $notification = $( '<div>' )
            .data( 'mw-notification', this )
Severity: Major
Found in resources/src/mediawiki.notification/notification.js - About 2 hrs to fix

    File notification.js has 262 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    ( function () {
        'use strict';
    
        var notification,
            // The .mw-notification-area div that all notifications are contained inside.
    Severity: Minor
    Found in resources/src/mediawiki.notification/notification.js - About 2 hrs to fix

      Function init has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function init() {
              var offset, $overlay,
                  isFloating = false;
      
              function updateAreaMode() {
      Severity: Minor
      Found in resources/src/mediawiki.notification/notification.js - About 1 hr to fix

        Function start has 41 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            Notification.prototype.start = function () {
                var options, $notification, $tagMatches, autohideCount;
        
                $area.css( 'display', '' );
        
        
        Severity: Minor
        Found in resources/src/mediawiki.notification/notification.js - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status