laboiteproject/lenuage

View on GitHub

Showing 179 of 384 total issues

Function tokenize has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
    var matched, match, tokens, type,
        soFar, groups, preFilters,
        cached = tokenCache[ selector + " " ];

Severity: Minor
Found in static/dist/js/site-70bd78197e.js - About 1 hr to fix

    Function _elementHandlers has 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          value: function _elementHandlers() {
            var _this5 = this;
    
            return this.$element.on({
              'setPreviousOptions.bootstrapSwitch': this.setPrevOptions.bind(this),
    Severity: Minor
    Found in static/dist/js/site-70bd78197e.js - About 1 hr to fix

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

        Carousel.prototype.slide = function (type, next) {
          var $active   = this.$element.find('.item.active')
          var $next     = next || this.getItemForDirection(type, $active)
          var isCycling = this.interval
          var direction = type == 'next' ? 'left' : 'right'
      Severity: Minor
      Found in static/dist/js/site-70bd78197e.js - About 1 hr to fix

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

            val: function( value ) {
                var hooks, ret, isFunction,
                    elem = this[ 0 ];
        
                if ( !arguments.length ) {
        Severity: Minor
        Found in static/dist/js/site-70bd78197e.js - About 1 hr to fix

          Function update_data has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
          Open

              def update_data(self):
                  # TODO: handle whole day events, display multiple events
                  now = timezone.now()
                  tonight = now.replace(hour=23, minute=59)
          
          
          Severity: Minor
          Found in laboite/apps/calendar/models.py - 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 showHide has 43 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function showHide( elements, show ) {
              var display, elem, hidden,
                  values = [],
                  index = 0,
                  length = elements.length;
          Severity: Minor
          Found in static/dist/js/site-70bd78197e.js - About 1 hr to fix

            Function extend has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            jQuery.extend = jQuery.fn.extend = function() {
                var options, name, src, copy, copyIsArray, clone,
                    target = arguments[ 0 ] || {},
                    i = 1,
                    length = arguments.length,
            Severity: Minor
            Found in static/dist/js/site-70bd78197e.js - About 1 hr to fix

              Function stop has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  stop: function( type, clearQueue, gotoEnd ) {
                      var stopQueue = function( hooks ) {
                          var stop = hooks.stop;
                          delete hooks.stop;
                          stop( gotoEnd );
              Severity: Minor
              Found in static/dist/js/site-70bd78197e.js - About 1 hr to fix

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

                function addCombinator( matcher, combinator, base ) {
                    var dir = combinator.dir,
                        checkNonElements = base && dir === "parentNode",
                        doneName = done++;
                
                
                Severity: Minor
                Found in static/dist/js/site-70bd78197e.js - About 1 hr to fix

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

                  function on( elem, types, selector, data, fn, one ) {
                      var origFn, type;
                  
                      // Types can be a map of types/handlers
                      if ( typeof types === "object" ) {
                  Severity: Minor
                  Found in static/dist/js/site-70bd78197e.js - About 1 hr to fix

                    Function 15 has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                    Open

                    },{}],15:[function(require,module,exports){
                    /*!
                     * jQuery JavaScript Library v2.2.4
                     * http://jquery.com/
                     *
                    Severity: Minor
                    Found in static/dist/js/site-70bd78197e.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 backdrop has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      Modal.prototype.backdrop = function (callback) {
                        var that = this
                        var animate = this.$element.hasClass('fade') ? 'fade' : ''
                    
                        if (this.isShown && this.options.backdrop) {
                    Severity: Minor
                    Found in static/dist/js/site-70bd78197e.js - About 1 hr to fix

                      Function show has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        Modal.prototype.show = function (_relatedTarget) {
                          var that = this
                          var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
                      
                          this.$element.trigger(e)
                      Severity: Minor
                      Found in static/dist/js/site-70bd78197e.js - About 1 hr to fix

                        Function access has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
                            var i = 0,
                                len = elems.length,
                                bulk = key == null;
                        
                        
                        Severity: Minor
                        Found in static/dist/js/site-70bd78197e.js - About 1 hr to fix

                          Function toggleClass has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              toggleClass: function( value, stateVal ) {
                                  var type = typeof value;
                          
                                  if ( typeof stateVal === "boolean" && type === "string" ) {
                                      return stateVal ? this.addClass( value ) : this.removeClass( value );
                          Severity: Minor
                          Found in static/dist/js/site-70bd78197e.js - About 1 hr to fix

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

                              Tab.prototype.activate = function (element, container, callback) {
                                var $active    = container.find('> .active')
                                var transition = callback
                                  && $.support.transition
                                  && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
                            Severity: Minor
                            Found in static/dist/js/site-70bd78197e.js - About 1 hr to fix

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

                              },{}],14:[function(require,module,exports){
                              /* ========================================================================
                               * Bootstrap: transition.js v3.3.7
                               * http://getbootstrap.com/javascript/#transitions
                               * ========================================================================
                              Severity: Minor
                              Found in static/dist/js/site-70bd78197e.js - About 1 hr to fix

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

                                function ajaxHandleResponses( s, jqXHR, responses ) {
                                
                                    var ct, type, finalDataType, firstDataType,
                                        contents = s.contents,
                                        dataTypes = s.dataTypes;
                                Severity: Minor
                                Found in static/dist/js/site-70bd78197e.js - About 1 hr to fix

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

                                      when: function( subordinate /* , ..., subordinateN */ ) {
                                          var i = 0,
                                              resolveValues = slice.call( arguments ),
                                              length = resolveValues.length,
                                  
                                  
                                  Severity: Minor
                                  Found in static/dist/js/site-70bd78197e.js - About 1 hr to fix

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

                                      Collapse.prototype.show = function () {
                                        if (this.transitioning || this.$element.hasClass('in')) return
                                    
                                        var activesData
                                        var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
                                    Severity: Minor
                                    Found in static/dist/js/site-70bd78197e.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language