Showing 108 of 274 total issues
Function 1
has 7402 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
1: [ function ( require, module, exports ) {
module.exports = ( function ( $ ) {
$.uls = $.uls || {};
$.uls.data =
{
Function exports
has 7400 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = ( function ( $ ) {
$.uls = $.uls || {};
$.uls.data =
{
"languages": {
File jquery.uls.data.js
has 7406 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 =
File rangy-core.js
has 2914 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Rangy, a cross-browser JavaScript range and selection library
* https://github.com/timdown/rangy
*
* Copyright 2015, Tim Down
File jquery.ime.js
has 2717 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*! jquery.ime - v0.2.0+20241001
* https://github.com/wikimedia/jquery.ime
* Copyright (c) 2024 Santhosh Thottingal; License: (GPL-2.0-or-later OR MIT) */
( function ( $ ) {
'use strict';
File ext.uls.webfonts.repository.js
has 828 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Do not edit! This file is generated from data/fontrepo by scripts/compile-font-repo.php
( function () {
$.webfonts = $.webfonts || {};
$.webfonts.repository = {
"base": "../data/fontrepo/fonts/",
Function createPrototypeRange
has 195 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createPrototypeRange(constructor, boundaryUpdater) {
function createBeforeAfterNodeSetter(isBefore, isStart) {
return function(node) {
assertValidNodeType(node, beforeAfterNodeTypes);
assertValidNodeType(getRootContainer(node), rootContainerNodeTypes);
File ext.uls.interface.js
has 467 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* ULS interface integration logic
*
* Copyright (C) 2012-2013 Alolita Sharma, Amir Aharoni, Arun Ganesh, Brandon Harris,
* Niklas Laxström, Pau Giner, Santhosh Thottingal, Siebrand Mazeland and other
File ext.uls.displaysettings.js
has 451 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* ULS-based display settings panel
*
* Copyright (C) 2012 Alolita Sharma, Amir Aharoni, Arun Ganesh, Brandon Harris,
* Niklas Laxström, Pau Giner, Santhosh Thottingal, Siebrand Mazeland and other
Function ULSDialog
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var ULSDialog = function ( options ) {
var $dialog = options.container,
hasOverlay = options.hasOverlay,
$overlay,
// Source: https://github.com/ghosh/Micromodal/blob/master/lib/src/index.js#L4
File ext.uls.inputsettings.js
has 380 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* ULS-based ime settings panel
*
* Copyright (C) 2012 Alolita Sharma, Amir Aharoni, Arun Ganesh, Brandon Harris,
* Niklas Laxström, Pau Giner, Santhosh Thottingal, Siebrand Mazeland and other
File jquery.uls.lcd.js
has 376 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Universal Language Selector
* Language category display component - Used for showing the search results,
* grouped by regions, scripts
*
File am-transliteration.js
has 374 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
( function ( $ ) {
'use strict';
var amTransliteration = {
id: 'am-transliteration',
File ti-geezim.js
has 366 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
( function ( $ ) {
'use strict';
var tiGeezim = {
id: 'ti-geezim',
File tig-geezim.js
has 366 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
( function ( $ ) {
'use strict';
var tigGeezim = {
id: 'tig-geezim',
File byn-geezim.js
has 366 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
( function ( $ ) {
'use strict';
var bynGeezim = {
id: 'byn-geezim',
Function search
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
Open
public static function search( $searchKey, $typos = 0, $userLanguage = null ) {
$results = [];
$searchKey = mb_strtolower( $searchKey );
if ( mb_strlen( $searchKey ) > 100 ) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File Hooks.php
has 351 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Hooks for UniversalLanguageSelector extension.
*
* Copyright (C) 2012-2018 Alolita Sharma, Amir Aharoni, Arun Ganesh, Brandon
File ml-transliteration.js
has 333 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
( function ( $ ) {
'use strict';
var mltransliteration = {
id: 'ml-transliteration',
Method execute
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
// Avoid local configuration leaking to this script
if ( $this->getConfig()->get( MainConfigNames::ExtraLanguageNames ) !== [] ) {
$this->fatalError( 'You have entries in $wgExtraLanguageNames. Needs to be empty for this script.' );
}