wikimedia/mediawiki-core

View on GitHub
resources/src/mediawiki.page.watch.ajax/watch-ajax.js

Summary

Maintainability
B
6 hrs
Test Coverage

Function watchstar has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function watchstar( $links, title, callback ) {
        // Set up the ARIA connection between the watch link and the notification.
        // This is set outside the click handler so that it's already present when the user clicks.
        var notificationId = 'mw-watchlink-notification';
        var mwTitle = mw.Title.newFromText( title );
Severity: Major
Found in resources/src/mediawiki.page.watch.ajax/watch-ajax.js - About 3 hrs to fix

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

        function updateWatchLinkAttributes( $link, action, state, expiry ) {
            // A valid but empty jQuery object shouldn't throw a TypeError
            if ( !$link.length ) {
                return;
            }
    Severity: Minor
    Found in resources/src/mediawiki.page.watch.ajax/watch-ajax.js - About 1 hr to fix

      Function updateWatchLink has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          function updateWatchLink( titleOrLink, action, state, expiry, expirySelected ) {
      Severity: Minor
      Found in resources/src/mediawiki.page.watch.ajax/watch-ajax.js - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status