XingFramework/xing-frontend-utils

View on GitHub

Showing 208 of 208 total issues

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

var _createClass = (function () {
  function defineProperties(target, props) {
    for (var i = 0; i < props.length; i++) {
      var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ('value' in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);
    }
Severity: Major
Found in dist/xing-frontend-utils.js and 18 other locations - About 6 hrs to fix
dist/xing-frontend-utils.js on lines 236..236
dist/xing-frontend-utils.js on lines 338..338
dist/xing-frontend-utils.js on lines 880..880
dist/xing-frontend-utils.js on lines 934..934
dist/xing-frontend-utils.js on lines 1309..1309
dist/xing-frontend-utils.js on lines 1653..1653
dist/xing-frontend-utils.js on lines 1723..1723
dist/xing-frontend-utils.js on lines 1828..1828
dist/xing-frontend-utils.js on lines 1936..1936
dist/xing-frontend-utils.js on lines 2062..2062
dist/xing-frontend-utils.js on lines 2154..2154
dist/xing-frontend-utils.js on lines 2218..2218
dist/xing-frontend-utils.js on lines 2267..2267
dist/xing-frontend-utils.js on lines 2464..2464
dist/xing-frontend-utils.js on lines 2889..2897
dist/xing-frontend-utils.js on lines 2948..2956
dist/xing-frontend-utils.js on lines 3861..3869
dist/xing-frontend-utils.js on lines 3910..3918

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

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 Injector has 166 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var Injector = (function () {
      function Injector() {
        var appNamePrefix = arguments.length <= 0 || arguments[0] === undefined ? "" : arguments[0];

        _classCallCheck(this, Injector);
Severity: Major
Found in dist/xing-frontend-utils.js - About 6 hrs to fix

    Function ComponentMapper has 166 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        var ComponentMapper = (function () {
          function ComponentMapper() {
            _classCallCheck(this, ComponentMapper);
          }
    
    
    Severity: Major
    Found in dist/xing-frontend-utils.js - About 6 hrs to fix

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

      export function whenGoto($location) {
        var search = $location.search();
        if (search.goto) {
          var target = search.goto;
      
      
      Severity: Major
      Found in src/xing-frontend-utils/appConfig.js and 1 other location - About 6 hrs to fix
      src/xing-frontend-utils/whenGoto.js on lines 1..21

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

      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

      export default function whenGoto($location) {
        var search = $location.search();
        if (search.goto) {
          var target = search.goto;
      
      
      Severity: Major
      Found in src/xing-frontend-utils/whenGoto.js and 1 other location - About 6 hrs to fix
      src/xing-frontend-utils/appConfig.js on lines 3..23

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

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

          var FilterInjector = (function (_ListInjector11) {
            _inherits(FilterInjector, _ListInjector11);
      
            function FilterInjector() {
              _classCallCheck(this, FilterInjector);
      Severity: Major
      Found in dist/xing-frontend-utils.js and 7 other locations - About 6 hrs to fix
      dist/xing-frontend-utils.js on lines 1047..1070
      dist/xing-frontend-utils.js on lines 1074..1097
      dist/xing-frontend-utils.js on lines 1101..1124
      dist/xing-frontend-utils.js on lines 1128..1151
      dist/xing-frontend-utils.js on lines 1155..1178
      dist/xing-frontend-utils.js on lines 1182..1205
      dist/xing-frontend-utils.js on lines 1209..1232

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

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

          var ValueInjector = (function (_ListInjector8) {
            _inherits(ValueInjector, _ListInjector8);
      
            function ValueInjector() {
              _classCallCheck(this, ValueInjector);
      Severity: Major
      Found in dist/xing-frontend-utils.js and 7 other locations - About 6 hrs to fix
      dist/xing-frontend-utils.js on lines 1047..1070
      dist/xing-frontend-utils.js on lines 1074..1097
      dist/xing-frontend-utils.js on lines 1101..1124
      dist/xing-frontend-utils.js on lines 1128..1151
      dist/xing-frontend-utils.js on lines 1182..1205
      dist/xing-frontend-utils.js on lines 1209..1232
      dist/xing-frontend-utils.js on lines 1236..1259

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

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

          var ServiceInjector = (function (_ListInjector5) {
            _inherits(ServiceInjector, _ListInjector5);
      
            function ServiceInjector() {
              _classCallCheck(this, ServiceInjector);
      Severity: Major
      Found in dist/xing-frontend-utils.js and 7 other locations - About 6 hrs to fix
      dist/xing-frontend-utils.js on lines 1047..1070
      dist/xing-frontend-utils.js on lines 1101..1124
      dist/xing-frontend-utils.js on lines 1128..1151
      dist/xing-frontend-utils.js on lines 1155..1178
      dist/xing-frontend-utils.js on lines 1182..1205
      dist/xing-frontend-utils.js on lines 1209..1232
      dist/xing-frontend-utils.js on lines 1236..1259

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

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

          var AnimationInjector = (function (_ListInjector10) {
            _inherits(AnimationInjector, _ListInjector10);
      
            function AnimationInjector() {
              _classCallCheck(this, AnimationInjector);
      Severity: Major
      Found in dist/xing-frontend-utils.js and 7 other locations - About 6 hrs to fix
      dist/xing-frontend-utils.js on lines 1047..1070
      dist/xing-frontend-utils.js on lines 1074..1097
      dist/xing-frontend-utils.js on lines 1101..1124
      dist/xing-frontend-utils.js on lines 1128..1151
      dist/xing-frontend-utils.js on lines 1155..1178
      dist/xing-frontend-utils.js on lines 1182..1205
      dist/xing-frontend-utils.js on lines 1236..1259

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

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

          var ProviderInjector = (function (_ListInjector7) {
            _inherits(ProviderInjector, _ListInjector7);
      
            function ProviderInjector() {
              _classCallCheck(this, ProviderInjector);
      Severity: Major
      Found in dist/xing-frontend-utils.js and 7 other locations - About 6 hrs to fix
      dist/xing-frontend-utils.js on lines 1047..1070
      dist/xing-frontend-utils.js on lines 1074..1097
      dist/xing-frontend-utils.js on lines 1101..1124
      dist/xing-frontend-utils.js on lines 1155..1178
      dist/xing-frontend-utils.js on lines 1182..1205
      dist/xing-frontend-utils.js on lines 1209..1232
      dist/xing-frontend-utils.js on lines 1236..1259

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

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

          var ConstantInjector = (function (_ListInjector9) {
            _inherits(ConstantInjector, _ListInjector9);
      
            function ConstantInjector() {
              _classCallCheck(this, ConstantInjector);
      Severity: Major
      Found in dist/xing-frontend-utils.js and 7 other locations - About 6 hrs to fix
      dist/xing-frontend-utils.js on lines 1047..1070
      dist/xing-frontend-utils.js on lines 1074..1097
      dist/xing-frontend-utils.js on lines 1101..1124
      dist/xing-frontend-utils.js on lines 1128..1151
      dist/xing-frontend-utils.js on lines 1155..1178
      dist/xing-frontend-utils.js on lines 1209..1232
      dist/xing-frontend-utils.js on lines 1236..1259

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

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

          var DirectiveInjector = (function (_ListInjector4) {
            _inherits(DirectiveInjector, _ListInjector4);
      
            function DirectiveInjector() {
              _classCallCheck(this, DirectiveInjector);
      Severity: Major
      Found in dist/xing-frontend-utils.js and 7 other locations - About 6 hrs to fix
      dist/xing-frontend-utils.js on lines 1074..1097
      dist/xing-frontend-utils.js on lines 1101..1124
      dist/xing-frontend-utils.js on lines 1128..1151
      dist/xing-frontend-utils.js on lines 1155..1178
      dist/xing-frontend-utils.js on lines 1182..1205
      dist/xing-frontend-utils.js on lines 1209..1232
      dist/xing-frontend-utils.js on lines 1236..1259

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

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

          var FactoryInjector = (function (_ListInjector6) {
            _inherits(FactoryInjector, _ListInjector6);
      
            function FactoryInjector() {
              _classCallCheck(this, FactoryInjector);
      Severity: Major
      Found in dist/xing-frontend-utils.js and 7 other locations - About 6 hrs to fix
      dist/xing-frontend-utils.js on lines 1047..1070
      dist/xing-frontend-utils.js on lines 1074..1097
      dist/xing-frontend-utils.js on lines 1128..1151
      dist/xing-frontend-utils.js on lines 1155..1178
      dist/xing-frontend-utils.js on lines 1182..1205
      dist/xing-frontend-utils.js on lines 1209..1232
      dist/xing-frontend-utils.js on lines 1236..1259

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

      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

          value: function link(scope, element, attrs, controller, transcludeFn) {
            var name = this.getUiViewName(attrs, element.inheritedData('$uiView'));
            var locals = name && this.$state.$current && this.$state.$current.locals[name];
            if (locals) {
              var viewStateName = locals.$$state.self.name;
      Severity: Major
      Found in dist/xing-frontend-utils.js and 1 other location - About 6 hrs to fix
      src/xing-frontend-utils/components/stateAttrs/stateAttrs.js on lines 18..31

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

      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

        link(scope, element, attrs, controller, transcludeFn){
          var name = this.getUiViewName(attrs, element.inheritedData('$uiView'));
          var locals  = name && this.$state.$current && this.$state.$current.locals[name];
          if (locals) {
            var viewStateName = locals.$$state.self.name;
      Severity: Major
      Found in src/xing-frontend-utils/components/stateAttrs/stateAttrs.js and 1 other location - About 6 hrs to fix
      dist/xing-frontend-utils.js on lines 2984..2997

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

      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

          var RunInjector = (function (_ListInjector2) {
            _inherits(RunInjector, _ListInjector2);
      
            function RunInjector() {
              _classCallCheck(this, RunInjector);
      Severity: Major
      Found in dist/xing-frontend-utils.js and 1 other location - About 6 hrs to fix
      dist/xing-frontend-utils.js on lines 965..988

      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

          var ConfigInjector = (function (_ListInjector) {
            _inherits(ConfigInjector, _ListInjector);
      
            function ConfigInjector() {
              _classCallCheck(this, ConfigInjector);
      Severity: Major
      Found in dist/xing-frontend-utils.js and 1 other location - About 6 hrs to fix
      dist/xing-frontend-utils.js on lines 992..1015

      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

      Function 20 has 143 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      },{}],20:[function(require,module,exports){
      'use strict';
      
      Object.defineProperty(exports, '__esModule', {
        value: true
      Severity: Major
      Found in dist/xing-frontend-utils.js - About 5 hrs to fix

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

          function onShow(scope, element, options) {
            element.addClass(options.position);
            options.parent.addClass(toastOpenClass(options.position));
        
            var configureSwipe = $xngSwipe(scope, 'swipeleft swiperight');
        Severity: Major
        Found in dist/xing-frontend-utils.js and 1 other location - About 4 hrs to fix
        src/xing-frontend-utils/components/toast/toast.js on lines 200..212

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

        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

                show: function() {
                  return $xngCompiler.compile(options).then(function(compiledData) {
                    element = compiledData.link(options.scope);
                    var ret = options.onShow(options.scope, element, options);
                    return $q.when(ret)
        Severity: Major
        Found in src/xing-frontend-utils/components/toast/interimElement.js and 1 other location - About 4 hrs to fix
        dist/xing-frontend-utils.js on lines 3316..3328

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

        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