XingFramework/xing-frontend-utils

View on GitHub

Showing 208 of 208 total issues

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

  function Resolve() {
    _classCallCheck(this, _Resolve);

    for (var _len = arguments.length, inject = Array(_len), _key = 0; _key < _len; _key++) {
      inject[_key] = arguments[_key];
Severity: Major
Found in dist/xing-frontend-utils.js and 2 other locations - About 2 hrs to fix
dist/xing-frontend-utils.js on lines 574..582
dist/xing-frontend-utils.js on lines 4699..4707

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

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

    var NgAnnotation = function NgAnnotation() {
      _classCallCheck(this, NgAnnotation);

      for (var _len = arguments.length, dependencies = Array(_len), _key = 0; _key < _len; _key++) {
        dependencies[_key] = arguments[_key];
Severity: Major
Found in dist/xing-frontend-utils.js and 2 other locations - About 2 hrs to fix
dist/xing-frontend-utils.js on lines 4681..4689
dist/xing-frontend-utils.js on lines 4699..4707

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

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

  function Inject() {
    _classCallCheck(this, _Inject);

    for (var _len2 = arguments.length, inject = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
      inject[_key2] = arguments[_key2];
Severity: Major
Found in dist/xing-frontend-utils.js and 2 other locations - About 2 hrs to fix
dist/xing-frontend-utils.js on lines 574..582
dist/xing-frontend-utils.js on lines 4681..4689

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

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

},{"./responsive-menu.tpl.js":11,"a1atscript":1}],13:[function(require,module,exports){
'use strict';

Object.defineProperty(exports, '__esModule', {
  value: true
Severity: Major
Found in dist/xing-frontend-utils.js - About 2 hrs to fix

    Function Inflector has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      Function ComponentInjector has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          var ComponentInjector = (function (_ListInjector) {
            _inherits(ComponentInjector, _ListInjector);
      
            function ComponentInjector() {
              _classCallCheck(this, ComponentInjector);
      Severity: Major
      Found in dist/xing-frontend-utils.js - About 2 hrs to fix

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

        var State = (function () {
          function State(stateName) {
            _classCallCheck(this, _State);
        
            this.stateName = stateName;
        Severity: Major
        Found in dist/xing-frontend-utils.js and 1 other location - About 2 hrs to fix
        dist/xing-frontend-utils.js on lines 1804..1814

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

        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 RouteConfig = (function () {
              function RouteConfig(routeDescription) {
                _classCallCheck(this, _RouteConfig);
        
                this.routeDescription = routeDescription;
        Severity: Major
        Found in dist/xing-frontend-utils.js and 1 other location - About 2 hrs to fix
        dist/xing-frontend-utils.js on lines 4666..4676

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

        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

              for (var _len = arguments.length, params = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
                params[_key - 2] = arguments[_key];
              }
        Severity: Major
        Found in dist/xing-frontend-utils.js and 1 other location - About 1 hr to fix
        dist/xing-frontend-utils.js on lines 854..856

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

        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

                  for (var _len2 = arguments.length, otherParams = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
                    otherParams[_key2 - 1] = arguments[_key2];
                  }
        Severity: Major
        Found in dist/xing-frontend-utils.js and 1 other location - About 1 hr to fix
        dist/xing-frontend-utils.js on lines 2447..2449

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

        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

        function RequestInterceptor(Serializer) {
          var serializer = new Serializer();
        
          return function(elem, operation, what) {
            var retElem = elem;
        Severity: Major
        Found in src/xing-frontend-utils/serializer.js and 1 other location - About 1 hr to fix
        dist/xing-frontend-utils.js on lines 4451..4461

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

        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

        function RequestInterceptor(Serializer) {
          var serializer = new Serializer();
        
          return function (elem, operation, what) {
            var retElem = elem;
        Severity: Major
        Found in dist/xing-frontend-utils.js and 1 other location - About 1 hr to fix
        src/xing-frontend-utils/serializer.js on lines 434..444

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

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

            var RouteReader = (function () {
              function RouteReader(componentMapper) {
                _classCallCheck(this, RouteReader);
        
                this.componentMapper = componentMapper;
        Severity: Minor
        Found in dist/xing-frontend-utils.js - About 1 hr to fix

          Function 14 has 48 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          },{"a1atscript":1}],14:[function(require,module,exports){
          'use strict';
          
          function xngCompilerService($q, $http, $injector, $compile, $controller, $templateCache) {
          
          
          Severity: Minor
          Found in dist/xing-frontend-utils.js - About 1 hr to fix

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

                    remove: function() {
                      self.cancelTimeout();
                      var ret = options.onRemove(options.scope, element, options);
                      return $q.when(ret).then(function() {
                        options.scope.$destroy();
            Severity: Major
            Found in src/xing-frontend-utils/components/toast/interimElement.js and 1 other location - About 1 hr to fix
            dist/xing-frontend-utils.js on lines 3335..3341

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

            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

                    remove: function remove() {
                      self.cancelTimeout();
                      var ret = options.onRemove(options.scope, element, options);
                      return $q.when(ret).then(function () {
                        options.scope.$destroy();
            Severity: Major
            Found in dist/xing-frontend-utils.js and 1 other location - About 1 hr to fix
            src/xing-frontend-utils/components/toast/interimElement.js on lines 180..186

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

            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 NgNamedAnnotation = function NgNamedAnnotation(token) {
                  var dependencies = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1];
            
                  _classCallCheck(this, NgNamedAnnotation);
            
            
            Severity: Major
            Found in dist/xing-frontend-utils.js and 1 other location - About 1 hr to fix
            dist/xing-frontend-utils.js on lines 2282..2289

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

            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

                  function DirectiveObject(token) {
                    var dependencies = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1];
            
                    _classCallCheck(this, _DirectiveObject);
            
            
            Severity: Major
            Found in dist/xing-frontend-utils.js and 1 other location - About 1 hr to fix
            dist/xing-frontend-utils.js on lines 584..591

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

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

            function xngCompilerService($q, $http, $injector, $compile, $controller, $templateCache) {
            
              /**
               * @ngdoc service
               * @name $xngCompiler
            Severity: Minor
            Found in src/xing-frontend-utils/components/toast/compiler.js - About 1 hr to fix

              Function xngCompilerService has 45 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function xngCompilerService($q, $http, $injector, $compile, $controller, $templateCache) {
              
                /**
                 * @ngdoc service
                 * @name $xngCompiler
              Severity: Minor
              Found in dist/xing-frontend-utils.js - About 1 hr to fix
                Severity
                Category
                Status
                Source
                Language