wikimedia/mediawiki-extensions-Wikibase

View on GitHub

Showing 2,096 of 2,096 total issues

Method convertUnit has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function convertUnit( $unit, $convertUnits, $coherentUnits, $unitUsage, &$reconvert ) {
        $unit['unit'] = substr( $unit['unit'], $this->baseLen );
        $unit['siUnit'] = substr( $unit['siUnit'], $this->baseLen );

        if ( isset( $convertUnits[$unit['unit']] ) ) {
Severity: Minor
Found in repo/maintenance/updateUnits.php - About 1 hr to fix

    Method processStatements has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function processStatements( $values, $map ) {
            $shortValues = array_map( function ( $str ) {
                return 'wdv:' . $str;
            }, $values );
            $valuesStr = implode( ' ', $shortValues );
    Severity: Minor
    Found in repo/maintenance/addUnitConversions.php - About 1 hr to fix

      Method execute has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function execute( PatchPropertyRequest $request ): PatchPropertyResponse {
              $deserializedRequest = $this->validator->validateAndDeserialize( $request );
              $propertyId = $deserializedRequest->getPropertyId();
              $providedMetadata = $deserializedRequest->getEditMetadata();
      
      

        Method handleDescriptionsValidationError has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function handleDescriptionsValidationError( ValidationError $validationError ): void {
                $context = $validationError->getContext();
                switch ( $validationError->getCode() ) {
                    case DescriptionsSyntaxValidator::CODE_DESCRIPTIONS_NOT_ASSOCIATIVE:
                        throw UseCaseError::newPatchResultInvalidValue(

          Method execute has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function execute( PatchStatementRequest $request ): PatchStatementResponse {
                  $deserializedRequest = $this->useCaseValidator->validateAndDeserialize( $request );
                  $statementId = $deserializedRequest->getStatementId();
                  $editMetadata = $deserializedRequest->getEditMetadata();
          
          

            Method execute has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function execute() {
                    $stripProtocols = (bool)$this->getOption( 'strip-protocols', false );
                    $forceProtocol = $this->getOption( 'force-protocol', null );
                    $url = $this->getOption( 'load-from', 'https://meta.wikimedia.org/w/api.php' );
                    $scriptPath = $this->getOption( 'script-path', '/w/$1' );
            Severity: Minor
            Found in lib/maintenance/populateSitesTable.php - About 1 hr to fix

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

              /***/ "00e9":
              /***/ (function(module, __webpack_exports__, __webpack_require__) {
              
              "use strict";
              /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_index_js_ref_0_1_TaintedPopper_vue_vue_type_style_index_0_id_1cf80a67_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b7ed");
              Severity: Major
              Found in view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js and 3 other locations - About 1 hr to fix
              view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js on lines 565..574
              view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js on lines 1296..1305
              view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js on lines 1753..1762

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

              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

              /***/ "f2b5":
              /***/ (function(module, __webpack_exports__, __webpack_require__) {
              
              "use strict";
              /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_index_js_ref_0_1_TaintedIcon_vue_vue_type_style_index_0_id_6df35c90_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("e455");
              Severity: Major
              Found in view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js and 3 other locations - About 1 hr to fix
              view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js on lines 90..99
              view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js on lines 565..574
              view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js on lines 1296..1305

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

              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

                          if ( this._rankSelector ) {
                              this._rankSelector.destroy();
                              this.$rankSelector.off( '.' + this.widgetName );
                              this._rankSelector = null;
                          }
              view/resources/jquery/wikibase/jquery.wikibase.statementview.js on lines 403..407

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

              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

                          config.plugin( 'extract-css' )
                              .tap( ( [ options, ...args ] ) => [
                                  Object.assign( {}, options, { filename: `css/${filePrefix}[name].css` } ),
                                  ...args,
                              ] );
              Severity: Major
              Found in client/data-bridge/vue.config.js and 1 other location - About 1 hr to fix
              view/lib/wikibase-tainted-ref/vue.config.js on lines 37..41

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

              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

                          if ( this._mainSnakSnakView ) {
                              this._mainSnakSnakView.destroy();
                              this.$mainSnak.off( '.' + this.widgetName );
                              this._mainSnakSnakView = null;
                          }
              view/resources/jquery/wikibase/jquery.wikibase.statementview.js on lines 397..401

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

              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

                      _getPropertySelector: function () {
                          if ( this.$property ) {
                              return this.$property.children().first().data( 'entityselector' ) || null;
                          }
                          return null;
              Severity: Major
              Found in view/resources/jquery/wikibase/snakview/snakview.js and 1 other location - About 1 hr to fix
              view/resources/jquery/wikibase/snakview/snakview.js on lines 402..407

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

              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

                      _getSnakTypeSelector: function () {
                          if ( this.$snakTypeSelector ) {
                              return this.$snakTypeSelector.children().first().data( 'snaktypeselector' ) || null;
                          }
                          return null;
              Severity: Major
              Found in view/resources/jquery/wikibase/snakview/snakview.js and 1 other location - About 1 hr to fix
              view/resources/jquery/wikibase/snakview/snakview.js on lines 387..392

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

              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

                          config.plugin( 'extract-css' )
                              .tap( ( [ options, ...args ] ) => [
                                  Object.assign( {}, options, { filename: `${filePrefix}[name].css` } ),
                                  ...args,
                              ] );
              Severity: Major
              Found in view/lib/wikibase-tainted-ref/vue.config.js and 1 other location - About 1 hr to fix
              client/data-bridge/vue.config.js on lines 58..62

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

              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

              /***/ "5ab0":
              /***/ (function(module, __webpack_exports__, __webpack_require__) {
              
              "use strict";
              /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_index_js_ref_0_1_App_vue_vue_type_style_index_0_id_1b644473_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("e0e7");
              Severity: Major
              Found in view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js and 3 other locations - About 1 hr to fix
              view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js on lines 90..99
              view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js on lines 1296..1305
              view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js on lines 1753..1762

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

              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

              /***/ "c158":
              /***/ (function(module, __webpack_exports__, __webpack_require__) {
              
              "use strict";
              /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_index_js_ref_0_1_Popper_vue_vue_type_style_index_0_id_177cf74e_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b6a2");
              Severity: Major
              Found in view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js and 3 other locations - About 1 hr to fix
              view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js on lines 90..99
              view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js on lines 565..574
              view/lib/wikibase-tainted-ref/dist/tainted-ref.common.js on lines 1753..1762

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

              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 get isAssertUserFailedError(): boolean {
                      return this.state.applicationErrors.length === 1
                          && this.state.applicationErrors[ 0 ].type === ErrorTypes.ASSERT_USER_FAILED;
                  }
              Severity: Major
              Found in client/data-bridge/src/store/getters.ts and 1 other location - About 1 hr to fix
              client/data-bridge/src/store/getters.ts on lines 84..87

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

              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 get isEditConflictError(): boolean {
                      return this.state.applicationErrors.length === 1
                          && this.state.applicationErrors[ 0 ].type === ErrorTypes.EDIT_CONFLICT;
                  }
              Severity: Major
              Found in client/data-bridge/src/store/getters.ts and 1 other location - About 1 hr to fix
              client/data-bridge/src/store/getters.ts on lines 79..82

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

              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

                      if ( snakType !== 'value' ) {
                          const error: ApplicationError = {
                              type: ErrorTypes.UNSUPPORTED_SNAK_TYPE,
                              info: { snakType },
                          };
              Severity: Major
              Found in client/data-bridge/src/store/actions.ts and 1 other location - About 1 hr to fix
              client/data-bridge/src/store/actions.ts on lines 243..251

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

              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

                      if ( datatype !== 'string' ) {
                          const error: ApplicationError = {
                              type: ErrorTypes.UNSUPPORTED_DATATYPE,
                              info: {
                                  unsupportedDatatype: datatype,
              Severity: Major
              Found in client/data-bridge/src/store/actions.ts and 1 other location - About 1 hr to fix
              client/data-bridge/src/store/actions.ts on lines 231..237

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

              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