Showing 11,968 of 11,968 total issues
File ZhConversion.php
has 20772 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Simplified / Traditional Chinese conversion tables
*
* Automatically generated using code and data in maintenance/language/zhtable/
File first-letters-root.php
has 14746 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// File created by generateCollationData.php
return [
0 => 'ـ',
1 => ' ',
File vue.common.dev.js
has 9311 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Vue.js v2.6.11
* (c) 2014-2019 Evan You
* Released under the MIT License.
*/
File vue.common.prod.unminified.js
has 7890 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Vue.js v2.6.11
* (c) 2014-2020 Evan You
* Released under the MIT License.
*/
File jquery.js
has 6796 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jQuery JavaScript Library v3.4.1
* https://jquery.com/
*
* Includes Sizzle.js
File oojs-ui-core.js
has 6141 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* OOUI v0.41.0
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 2011–2020 OOUI Team and other contributors.
File sinon.js
has 4909 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Sinon.JS 1.17.7, 2017/02/15
*
* @author Christian Johansen (christian@cjohansen.no)
* @author Contributors: https://github.com/cjohansen/Sinon.JS/blob/master/AUTHORS
File moment.js
has 4564 lines of code (exceeds 250 allowed). Consider refactoring. Open
//! moment.js
//! version : 2.25.2
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
File qunit.js
has 4276 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* QUnit 2.10.0
* https://qunitjs.com/
*
* Copyright jQuery Foundation and other contributors
File HookRunner.php
has 4079 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace MediaWiki\HookContainer;
use Article;
File Parser.php
has 3978 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PHP parser that converts wiki markup to HTML.
*
* This program is free software; you can redistribute it and/or modify
HookRunner
has 543 functions (exceeds 20 allowed). Consider refactoring. Open
class HookRunner implements
\MediaWiki\Auth\Hook\AuthManagerLoginAuthenticateAuditHook,
\MediaWiki\Auth\Hook\ExemptFromAccountCreationThrottleHook,
\MediaWiki\Auth\Hook\LocalUserCreatedHook,
\MediaWiki\Auth\Hook\ResetPasswordExpirationHook,
Similar blocks of code found in 3 locations. Consider refactoring. Open
switch ( $case ) {
case "dc1":
case "genitive": # ilik
if ( in_array( $wordEnding, $Consonants ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
- Read upRead up
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 1545.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
switch ( $case ) {
case "dc1":
case "genitive": # ilik
if ( in_array( $wordEnding, $Consonants ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
- Read upRead up
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 1545.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
switch ( $case ) {
case "dc1":
case "genitive": # ilik
if ( in_array( $wordEnding, $Consonants ) ) {
if ( in_array( $wordLastVowel, $frontVowels ) ) {
- Read upRead up
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 1545.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
File Database.php
has 3323 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @defgroup Database Database
*
* This file deals with database interface functions
Function createPatchFunction
has a Cognitive Complexity of 429 (exceeds 5 allowed). Consider refactoring. Open
function createPatchFunction (backend) {
var i, j;
var cbs = {};
var modules = backend.modules;
- 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 EditPage.php
has 3104 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* User interface for page editing.
*
* This program is free software; you can redistribute it and/or modify
File Resources.php
has 2846 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Definition of core ResourceLoader modules.
*
* This program is free software; you can redistribute it and/or modify
Function createPatchFunction
has a Cognitive Complexity of 385 (exceeds 5 allowed). Consider refactoring. Open
function createPatchFunction (backend) {
var i, j;
var cbs = {};
var modules = backend.modules;
- 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"