XingFramework/xing-frontend-utils

View on GitHub

Showing 71 of 208 total issues

Function 12 has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{}],12:[function(require,module,exports){
'use strict';

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

    Function SelectorMatcher has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      Function PropertiesBuilder has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Function compile has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          this.compile = function(options) {
            var templateUrl = options.templateUrl;
            var template = options.template || '';
            var controller = options.controller;
            var controllerAs = options.controllerAs;
        Severity: Minor
        Found in src/xing-frontend-utils/components/toast/compiler.js - About 1 hr to fix

          Function compile has 43 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            this.compile = function (options) {
              var templateUrl = options.templateUrl;
              var template = options.template || '';
              var controller = options.controller;
              var controllerAs = options.controllerAs;
          Severity: Minor
          Found in dist/xing-frontend-utils.js - About 1 hr to fix

            Function StateInjector has 43 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Function SwipeService has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  return function SwipeService(scope, eventTypes) {
                    if (!eventTypes) {
                      eventTypes = "swipeleft swiperight";
                    }
              
              
              Severity: Minor
              Found in dist/xing-frontend-utils.js - About 1 hr to fix

                Function BindBuilder has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

                  Function InterimElement has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function InterimElement(options) {
                        var self;
                        var hideTimeout, element;
                  
                        options = options || {};
                  Severity: Minor
                  Found in src/xing-frontend-utils/components/toast/interimElement.js - About 1 hr to fix

                    Function 21 has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    },{"./error-list.tpl.js":15,"./error.tpl.js":16,"./interimElement.js":17,"./notice.tpl.js":18,"./swipe.js":19,"a1atscript":1,"xing-inflector":2}],21:[function(require,module,exports){
                    'use strict';
                    
                    Object.defineProperty(exports, '__esModule', {
                      value: true
                    Severity: Minor
                    Found in dist/xing-frontend-utils.js - About 1 hr to fix

                      Function SwipeService has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                            return function SwipeService(scope, eventTypes) {
                              if ( !eventTypes ) { eventTypes = "swipeleft swiperight"; }
                      
                              // publish configureFor() method for specific element instance
                              return function configureFor(element, onSwipeCallback, attachLater ) {
                      Severity: Minor
                      Found in src/xing-frontend-utils/components/toast/swipe.js - About 1 hr to fix

                        Function InterimElement has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function InterimElement(options) {
                              var self;
                              var hideTimeout, element;
                        
                              options = options || {};
                        Severity: Minor
                        Found in dist/xing-frontend-utils.js - About 1 hr to fix

                          Function xngToastService has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function xngToastService($timeout, $$interimElement, $animate, $xngSwipe, Inflector) {
                          
                            var factoryDef = {
                              onShow: onShow,
                              onRemove: onRemove,
                          Severity: Minor
                          Found in src/xing-frontend-utils/components/toast/toast.js - About 1 hr to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function configureFor has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                return function configureFor(element, onSwipeCallback, attachLater) {
                                  var hammertime = new Hammer(element[0], {
                                    recognizers: addRecognizers([], eventTypes)
                                  });
                          
                          
                          Severity: Minor
                          Found in dist/xing-frontend-utils.js - About 1 hr to fix

                            Function setupProperty has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    value: function setupProperty(key, properties) {
                                      properties[STRING_PREFIX + key] = "@" + this.bindObj[key];
                                      properties[BIND_PREFIX + key] = "=?bind" + this.bindObj[key][0].toUpperCase() + this.bindObj[key].slice(1);
                            
                                      // This property is used when user uses the `bind-property` attribute on a directive to bind an expression
                            Severity: Minor
                            Found in dist/xing-frontend-utils.js - About 1 hr to fix

                              Function StateAttrs has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

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

                                Function configureFor has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        return function configureFor(element, onSwipeCallback, attachLater ) {
                                          var hammertime = new Hammer(element[0], {
                                            recognizers : addRecognizers([], eventTypes )
                                          });
                                
                                
                                Severity: Minor
                                Found in src/xing-frontend-utils/components/toast/swipe.js - About 1 hr to fix

                                  Function 10 has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  },{"../../stateInjector.js":26,"./error-fallback.tpl.js":8,"a1atscript":1}],10:[function(require,module,exports){
                                  "use strict";
                                  
                                  Object.defineProperty(exports, "__esModule", {
                                    value: true
                                  Severity: Minor
                                  Found in dist/xing-frontend-utils.js - About 1 hr to fix

                                    Function AnnotationFinder has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

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

                                      Function 9 has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      },{}],9:[function(require,module,exports){
                                      'use strict';
                                      
                                      Object.defineProperty(exports, '__esModule', {
                                        value: true
                                      Severity: Minor
                                      Found in dist/xing-frontend-utils.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language