wikimedia/mediawiki-extensions-UniversalLanguageSelector

View on GitHub

Showing 269 of 269 total issues

Function 1 has 7068 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    1: [ function ( require, module, exports ) {
        module.exports = ( function ( $ ) {
            $.uls = $.uls || {};
            $.uls.data =
{
Severity: Major
Found in lib/jquery.uls/src/jquery.uls.data.js - About 1 mo to fix

    Function exports has 7066 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            module.exports = ( function ( $ ) {
                $.uls = $.uls || {};
                $.uls.data =
    {
        "languages": {
    Severity: Major
    Found in lib/jquery.uls/src/jquery.uls.data.js - About 1 mo to fix

      File jquery.uls.data.js has 7072 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      ( function () { function r( e, n, t ) { function o( i, f ) { if ( !n[ i ] ) { if ( !e[ i ] ) { var c = typeof require === 'function' && require; if ( !f && c ) { return c( i, !0 ); } if ( u ) { return u( i, !0 ); } var a = new Error( "Cannot find module '" + i + "'" ); throw a.code = 'MODULE_NOT_FOUND', a; } var p = n[ i ] = { exports: {} }; e[ i ][ 0 ].call( p.exports, function ( r ) { var n = e[ i ][ 1 ][ r ]; return o( n || r ); }, p, p.exports, r, e, n, t ); } return n[ i ].exports; } for ( var u = typeof require === 'function' && require, i = 0; i < t.length; i++ ) { o( t[ i ] ); } return o; } return r; }() )( {
          1: [ function ( require, module, exports ) {
              module.exports = ( function ( $ ) {
                  $.uls = $.uls || {};
                  $.uls.data =
      Severity: Major
      Found in lib/jquery.uls/src/jquery.uls.data.js - About 2 wks to fix

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

        ( function ( $ ) {
            'use strict';
        
            var bynGeezim = {
                id: 'byn-geezim',
        Severity: Major
        Found in lib/jquery.ime/rules/byn/byn-geezim.js and 2 other locations - About 1 wk to fix
        lib/jquery.ime/rules/ti/ti-geezim.js on lines 1..421
        lib/jquery.ime/rules/tig/tig-geezim.js on lines 1..421

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

        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

        ( function ( $ ) {
            'use strict';
        
            var tiGeezim = {
                id: 'ti-geezim',
        Severity: Major
        Found in lib/jquery.ime/rules/ti/ti-geezim.js and 2 other locations - About 1 wk to fix
        lib/jquery.ime/rules/byn/byn-geezim.js on lines 1..421
        lib/jquery.ime/rules/tig/tig-geezim.js on lines 1..421

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

        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

        ( function ( $ ) {
            'use strict';
        
            var tigGeezim = {
                id: 'tig-geezim',
        Severity: Major
        Found in lib/jquery.ime/rules/tig/tig-geezim.js and 2 other locations - About 1 wk to fix
        lib/jquery.ime/rules/byn/byn-geezim.js on lines 1..421
        lib/jquery.ime/rules/ti/ti-geezim.js on lines 1..421

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

        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

        File rangy-core.js has 2914 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * Rangy, a cross-browser JavaScript range and selection library
         * https://github.com/timdown/rangy
         *
         * Copyright 2015, Tim Down
        Severity: Major
        Found in lib/rangy/rangy-core.js - About 1 wk to fix

          File jquery.ime.js has 2605 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*! jquery.ime - v0.2.0+20240513
          * https://github.com/wikimedia/jquery.ime
          * Copyright (c) 2024 Santhosh Thottingal; License: (GPL-2.0-or-later OR MIT) */
          ( function ( $ ) {
              'use strict';
          Severity: Major
          Found in lib/jquery.ime/jquery.ime.js - About 1 wk to fix

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

            ( function ( $ ) {
                'use strict';
            
                var hyEmslegacy = {
                    id: 'hy-emslegacy',
            Severity: Major
            Found in lib/jquery.ime/rules/hy/hy-emslegacy.js and 3 other locations - About 3 days to fix
            lib/jquery.ime/rules/hy/hy-ephoneticalt.js on lines 17..171
            lib/jquery.ime/rules/hy/hy-typewriter.js on lines 14..168
            lib/jquery.ime/rules/hy/hy-wmslegacy.js on lines 15..169

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

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

            ( function ( $ ) {
                'use strict';
            
                var hyWmslegacy = {
                    id: 'hy-wmslegacy',
            Severity: Major
            Found in lib/jquery.ime/rules/hy/hy-wmslegacy.js and 3 other locations - About 3 days to fix
            lib/jquery.ime/rules/hy/hy-emslegacy.js on lines 15..169
            lib/jquery.ime/rules/hy/hy-ephoneticalt.js on lines 17..171
            lib/jquery.ime/rules/hy/hy-typewriter.js on lines 14..168

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

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

            ( function ( $ ) {
                'use strict';
            
                var hyTypewriter = {
                    id: 'hy-typewriter',
            Severity: Major
            Found in lib/jquery.ime/rules/hy/hy-typewriter.js and 3 other locations - About 3 days to fix
            lib/jquery.ime/rules/hy/hy-emslegacy.js on lines 15..169
            lib/jquery.ime/rules/hy/hy-ephoneticalt.js on lines 17..171
            lib/jquery.ime/rules/hy/hy-wmslegacy.js on lines 15..169

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

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

            ( function ( $ ) {
                'use strict';
            
                var hyEphonetic = {
                    id: 'hy-ephoneticalt',
            Severity: Major
            Found in lib/jquery.ime/rules/hy/hy-ephoneticalt.js and 3 other locations - About 3 days to fix
            lib/jquery.ime/rules/hy/hy-emslegacy.js on lines 15..169
            lib/jquery.ime/rules/hy/hy-typewriter.js on lines 14..168
            lib/jquery.ime/rules/hy/hy-wmslegacy.js on lines 15..169

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

            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

            ( function ( $ ) {
                'use strict';
            
                var asInScript = {
                    id: 'as-inscript',
            Severity: Major
            Found in lib/jquery.ime/rules/as/as-inscript.js and 1 other location - About 2 days to fix
            lib/jquery.ime/rules/bn/bn-inscript.js on lines 1..123

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

            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

            ( function ( $ ) {
                'use strict';
            
                var bnInScript = {
                    id: 'bn-inscript',
            Severity: Major
            Found in lib/jquery.ime/rules/bn/bn-inscript.js and 1 other location - About 2 days to fix
            lib/jquery.ime/rules/as/as-inscript.js on lines 1..124

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

            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

            ( function ( $ ) {
                'use strict';
            
                var kedmanee = {
                    id: 'th-kedmanee',
            Severity: Major
            Found in lib/jquery.ime/rules/th/th-kedmanee.js and 2 other locations - About 2 days to fix
            lib/jquery.ime/rules/as/as-phonetic.js on lines 1..112
            lib/jquery.ime/rules/th/th-pattachote.js on lines 1..115

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

            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

            ( function ( $ ) {
                'use strict';
            
                var asPhonetic = {
                    id: 'as-phonetic',
            Severity: Major
            Found in lib/jquery.ime/rules/as/as-phonetic.js and 2 other locations - About 2 days to fix
            lib/jquery.ime/rules/th/th-kedmanee.js on lines 1..115
            lib/jquery.ime/rules/th/th-pattachote.js on lines 1..115

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

            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

            ( function ( $ ) {
                'use strict';
            
                var pattachote = {
                    id: 'th-pattachote',
            Severity: Major
            Found in lib/jquery.ime/rules/th/th-pattachote.js and 2 other locations - About 2 days to fix
            lib/jquery.ime/rules/as/as-phonetic.js on lines 1..112
            lib/jquery.ime/rules/th/th-kedmanee.js on lines 1..115

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

            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

            ( function ( $ ) {
                'use strict';
            
                var orPhonetic = {
                    id: 'or-phonetic',
            Severity: Major
            Found in lib/jquery.ime/rules/or/or-phonetic.js and 1 other location - About 2 days to fix
            lib/jquery.ime/rules/mn/mn-trad.js on lines 1..112

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

            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

            ( function ( $ ) {
                'use strict';
            
                var tradMongolian = {
                    id: 'mn-trad',
            Severity: Major
            Found in lib/jquery.ime/rules/mn/mn-trad.js and 1 other location - About 2 days to fix
            lib/jquery.ime/rules/or/or-phonetic.js on lines 1..110

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

            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

            ( function ( $ ) {
                'use strict';
            
                var guPhonetic = {
                    id: 'gu-phonetic',
            Severity: Major
            Found in lib/jquery.ime/rules/gu/gu-phonetic.js and 1 other location - About 2 days to fix
            lib/jquery.ime/rules/hi/hi-phonetic.js on lines 1..111

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

            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