wikimedia/mediawiki-extensions-Wikibase

View on GitHub

Showing 2,096 of 2,096 total issues

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

    public function runUseCase( string $itemId, string $languageCode ): Response {
        $jsonBody = $this->getValidatedBody();
        '@phan-var array $jsonBody'; // guaranteed to be an array per getBodyParamSettings()

        try {
repo/rest-api/src/RouteHandlers/SetSitelinkRouteHandler.php on lines 86..113

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

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

Function _drawEditMode has 94 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _drawEditMode: function () {
            var self = this,
                pageNameInputOptions = {},
                dir = $( document.documentElement ).prop( 'dir' );

Severity: Major
Found in view/resources/jquery/wikibase/jquery.wikibase.sitelinkview.js - About 3 hrs to fix

    Function parseDateFormat has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
    Open

        private function parseDateFormat( $format ) {
            $length = strlen( $format );
    
            $number = $this->getNumberPattern();
            $notFollowedByNumber = '(?!' . $number . ')';
    Severity: Minor
    Found in repo/includes/Parsers/DateFormatParser.php - About 3 hrs to fix

    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

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        wb.buildErrorOutput = function ( error ) {
            var $message = $( '<div>' ).addClass( 'wb-error' );
    
            $message.append( $( '<div>' ).addClass( 'wb-error-message' ).text( error.message ) );
    
    
    Severity: Major
    Found in view/resources/wikibase/wikibase.buildErrorOutput.js and 1 other location - About 3 hrs to fix
    client/resources/wikibase.buildErrorOutput.js on lines 13..25

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

    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

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        var buildErrorOutput = function ( error ) {
            var $message = $( '<div>' ).addClass( 'wb-error' );
    
            $message.append( $( '<div>' ).addClass( 'wb-error-message' ).text( error.message ) );
    
    
    Severity: Major
    Found in client/resources/wikibase.buildErrorOutput.js and 1 other location - About 3 hrs to fix
    view/resources/wikibase/wikibase.buildErrorOutput.js on lines 13..25

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

    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

        public function getDescription( $prefixedEntityId ) {
            try {
                $entityId = $this->entityIdParser->parse( $prefixedEntityId );
            } catch ( EntityIdParsingException $e ) {
                return [ null, null ];
    client/includes/DataAccess/Scribunto/WikibaseLanguageDependentLuaBindings.php on lines 52..75

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

    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

        public function getLabel( $prefixedEntityId ) {
            try {
                $entityId = $this->entityIdParser->parse( $prefixedEntityId );
            } catch ( EntityIdParsingException $e ) {
                return [ null, null ];
    client/includes/DataAccess/Scribunto/WikibaseLanguageDependentLuaBindings.php on lines 83..105

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

    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

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

        public function __construct(
            ApiMain $mainModule,
            string $moduleName,
            ApiErrorReporter $errorReporter,
            StatementChangeOpFactory $statementChangeOpFactory,
    Severity: Major
    Found in repo/includes/Api/RemoveQualifiers.php and 3 other locations - About 3 hrs to fix
    repo/includes/Api/RemoveClaims.php on lines 73..96
    repo/includes/Api/RemoveReferences.php on lines 70..92
    repo/includes/Api/SetClaimValue.php on lines 66..88

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

    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

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

        public function __construct(
            ApiMain $mainModule,
            string $moduleName,
            ApiErrorReporter $errorReporter,
            StatementChangeOpFactory $statementChangeOpFactory,
    Severity: Major
    Found in repo/includes/Api/RemoveReferences.php and 3 other locations - About 3 hrs to fix
    repo/includes/Api/RemoveClaims.php on lines 73..96
    repo/includes/Api/RemoveQualifiers.php on lines 71..93
    repo/includes/Api/SetClaimValue.php on lines 66..88

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

    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

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

        public function __construct(
            ApiMain $mainModule,
            string $moduleName,
            ApiErrorReporter $errorReporter,
            StatementChangeOpFactory $statementChangeOpFactory,
    Severity: Major
    Found in repo/includes/Api/SetClaimValue.php and 3 other locations - About 3 hrs to fix
    repo/includes/Api/RemoveClaims.php on lines 73..96
    repo/includes/Api/RemoveQualifiers.php on lines 71..93
    repo/includes/Api/RemoveReferences.php on lines 70..92

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

    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

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

        public function __construct(
            ApiMain $mainModule,
            string $moduleName,
            ApiErrorReporter $errorReporter,
            StatementChangeOpFactory $statementChangeOpFactory,
    Severity: Major
    Found in repo/includes/Api/RemoveClaims.php and 3 other locations - About 3 hrs to fix
    repo/includes/Api/RemoveQualifiers.php on lines 71..93
    repo/includes/Api/RemoveReferences.php on lines 70..92
    repo/includes/Api/SetClaimValue.php on lines 66..88

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

    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

    $specialPageAliases['mk'] = [
        'DispatchStats' => [ 'СтатистикиСпроведување' ],
        'EntityData' => [ 'ЕдиницаПодатоци' ],
        'GoToLinkedPage' => [ 'ОдиНаСврзанаСтраница' ],
        'ItemByTitle' => [ 'ПредметПоНаслов' ],
    Severity: Major
    Found in repo/Wikibase.i18n.alias.php and 2 other locations - About 3 hrs to fix
    repo/Wikibase.i18n.alias.php on lines 150..167
    repo/Wikibase.i18n.alias.php on lines 495..512

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

    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

    $specialPageAliases['zh-hans'] = [
        'DispatchStats' => [ '发送统计' ],
        'EntityData' => [ '实体数据' ],
        'GoToLinkedPage' => [ '前往已链接页面' ],
        'ItemByTitle' => [ '项按标题' ],
    Severity: Major
    Found in repo/Wikibase.i18n.alias.php and 2 other locations - About 3 hrs to fix
    repo/Wikibase.i18n.alias.php on lines 150..167
    repo/Wikibase.i18n.alias.php on lines 360..377

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

    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

    $specialPageAliases['de'] = [
        'DispatchStats' => [ 'Abfertigungsstatistiken' ],
        'EntityData' => [ 'Objektdaten' ],
        'GoToLinkedPage' => [ 'Gehe_zur_verlinkten_Seite' ],
        'ItemByTitle' => [ 'Datenelement_nach_Name' ],
    Severity: Major
    Found in repo/Wikibase.i18n.alias.php and 2 other locations - About 3 hrs to fix
    repo/Wikibase.i18n.alias.php on lines 360..377
    repo/Wikibase.i18n.alias.php on lines 495..512

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

    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

    MediaWikiEditEntity has 30 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class MediaWikiEditEntity implements EditEntity {
    
        private EntityRevisionLookup $entityRevisionLookup;
        private EntityTitleStoreLookup $titleLookup;
        private EntityStore $entityStore;
    Severity: Minor
    Found in repo/includes/EditEntity/MediaWikiEditEntity.php - About 3 hrs to fix

      Method appModule has 90 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function appModule() {
              $clientSettings = WikibaseClient::getSettings();
              return new FileModule(
                  [
                      'scripts' => [
      Severity: Major
      Found in client/includes/DataBridge/DataBridgeResourceLoaderModules.php - About 3 hrs to fix

        Method attemptSave has 90 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function attemptSave( EntityDocument $newEntity, string $summary, $flags, $token, $watch = null, array $tags = [] ) {
                $this->checkReadOnly( $newEntity ); // throws, exception formatted by MediaWiki (cf. MWExceptionRenderer::getExceptionTitle)
                $this->checkEntityId( $newEntity->getId() ); // throws internal error (unexpected condition)
        
                $watch = $this->getDesiredWatchState( $watch );
        Severity: Major
        Found in repo/includes/EditEntity/MediaWikiEditEntity.php - About 3 hrs to fix

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

              public static function factory(): Handler {
                  $responseFactory = new ResponseFactory();
          
                  return new self(
                      WbRestApi::getSetPropertyLabel(),
          repo/rest-api/src/RouteHandlers/AddItemAliasesInLanguageRouteHandler.php on lines 56..72
          repo/rest-api/src/RouteHandlers/SetItemDescriptionRouteHandler.php on lines 53..69
          repo/rest-api/src/RouteHandlers/SetPropertyDescriptionRouteHandler.php on lines 52..68

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

          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

              public static function factory(): self {
                  $responseFactory = new ResponseFactory();
                  return new self(
                      WbRestApi::getSetPropertyDescription(),
                      $responseFactory,
          repo/rest-api/src/RouteHandlers/AddItemAliasesInLanguageRouteHandler.php on lines 56..72
          repo/rest-api/src/RouteHandlers/SetItemDescriptionRouteHandler.php on lines 53..69
          repo/rest-api/src/RouteHandlers/SetPropertyLabelRouteHandler.php on lines 53..70

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

          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

              public static function factory(): Handler {
                  $responseFactory = new ResponseFactory();
                  return new self(
                      WbRestApi::getAddItemAliasesInLanguage(),
                      $responseFactory,
          repo/rest-api/src/RouteHandlers/SetItemDescriptionRouteHandler.php on lines 53..69
          repo/rest-api/src/RouteHandlers/SetPropertyDescriptionRouteHandler.php on lines 52..68
          repo/rest-api/src/RouteHandlers/SetPropertyLabelRouteHandler.php on lines 53..70

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

          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