rloomans/new-teamtemp

View on GitHub

Showing 149 of 528 total issues

File jquery-3.6.3.js has 6910 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery JavaScript Library v3.6.3
 * https://jquery.com/
 *
 * Includes Sizzle.js
Severity: Major
Found in teamtemp/static/jquery-3.6.3.js - About 2 wks to fix

    Function Sizzle has 1522 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    ( function( window ) {
    var i,
        support,
        Expr,
        getText,
    Severity: Major
    Found in teamtemp/static/jquery-3.6.3.js - About 1 wk to fix

      File views.py has 1181 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      from __future__ import division, print_function
      
      from builtins import range, str
      import errno
      import sys
      Severity: Major
      Found in teamtemp/views.py - About 3 days to fix

        Function setDocument has 270 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        setDocument = Sizzle.setDocument = function( node ) {
            var hasCompare, subWindow,
                doc = node ? node.ownerDocument || node : preferredDoc;
        
            // Return early if doc is invalid or already selected
        Severity: Major
        Found in teamtemp/static/jquery-3.6.3.js - About 1 day to fix

          Function ajax has 259 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              ajax: function( url, options ) {
          
                  // If url is an object, simulate pre-1.5 signature
                  if ( typeof url === "object" ) {
                      options = url;
          Severity: Major
          Found in teamtemp/static/jquery-3.6.3.js - About 1 day to fix

            Function set_view has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
            Open

            def set_view(request, survey_id):
                survey = get_object_or_404(TeamTemperature, pk=survey_id)
            
                timezone.activate(pytz.timezone(survey.default_tz or 'UTC'))
            
            
            Severity: Minor
            Found in teamtemp/views.py - About 1 day 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 populate_chart_data_structures has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
            Open

            def populate_chart_data_structures(
                    survey_type_title,
                    teams,
                    team_history,
                    tz='UTC'):
            Severity: Minor
            Found in teamtemp/views.py - About 7 hrs 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 Deferred has 178 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                Deferred: function( func ) {
                    var tuples = [
            
                            // action, add listener, callbacks,
                            // ... .then handlers, argument index, [final state]
            Severity: Major
            Found in teamtemp/static/jquery-3.6.3.js - About 7 hrs to fix

              Function defaultPrefilter has 122 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function defaultPrefilter( elem, props, opts ) {
                  var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
                      isBox = "width" in props || "height" in props,
                      anim = this,
                      orig = {},
              Severity: Major
              Found in teamtemp/static/jquery-3.6.3.js - About 4 hrs to fix

                Function Callbacks has 121 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                jQuery.Callbacks = function( options ) {
                
                    // Convert options from String-formatted to Object-formatted if needed
                    // (we check in cache first)
                    options = typeof options === "string" ?
                Severity: Major
                Found in teamtemp/static/jquery-3.6.3.js - About 4 hrs to fix

                  Function populate_bvc_data has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def populate_bvc_data(
                          survey,
                          team_name,
                          archive_id,
                          num_iterations=0,
                  Severity: Minor
                  Found in teamtemp/views.py - About 4 hrs 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 then has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                  then: function( onFulfilled, onRejected, onProgress ) {
                                      var maxDepth = 0;
                                      function resolve( depth, deferred, handler, special ) {
                                          return function() {
                                              var that = this,
                  Severity: Major
                  Found in teamtemp/static/jquery-3.6.3.js - About 4 hrs to fix

                    Function Animation has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function Animation( elem, properties, options ) {
                        var result,
                            stopped,
                            index = 0,
                            length = Animation.prefilters.length,
                    Severity: Major
                    Found in teamtemp/static/jquery-3.6.3.js - About 3 hrs to fix

                      Function trigger has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          trigger: function( event, data, elem, onlyHandlers ) {
                      
                              var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
                                  eventPath = [ elem || document ],
                                  type = hasOwn.call( event, "type" ) ? event.type : event,
                      Severity: Major
                      Found in teamtemp/static/jquery-3.6.3.js - About 3 hrs to fix

                        Function team_view has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def team_view(request, survey_id, team_name=None):
                            survey = get_object_or_404(TeamTemperature, pk=survey_id)
                        
                            if not authenticated_user(request, survey):
                                return redirect(
                        Severity: Minor
                        Found in teamtemp/views.py - About 3 hrs 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 Sizzle has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function Sizzle( selector, context, results, seed ) {
                            var m, i, elem, nid, match, groups, newSelector,
                                newContext = context && context.ownerDocument,
                        
                                // nodeType defaults to 9, since context defaults to document
                        Severity: Major
                        Found in teamtemp/static/jquery-3.6.3.js - About 3 hrs to fix

                          File forms.py has 303 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import re
                          
                          import pytz
                          from builtins import object
                          from builtins import str
                          Severity: Minor
                          Found in teamtemp/responses/forms.py - About 3 hrs to fix

                            Function CHILD has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    "CHILD": function( type, what, _argument, first, last ) {
                                        var simple = type.slice( 0, 3 ) !== "nth",
                                            forward = type.slice( -4 ) !== "last",
                                            ofType = what === "of-type";
                            
                            
                            Severity: Major
                            Found in teamtemp/static/jquery-3.6.3.js - About 3 hrs to fix

                              Function send has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                          send: function( headers, complete ) {
                                              var i,
                                                  xhr = options.xhr();
                              
                                              xhr.open(
                              Severity: Major
                              Found in teamtemp/static/jquery-3.6.3.js - About 3 hrs to fix

                                Function cached_word_cloud has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                                Open

                                def cached_word_cloud(word_list=None, word_hash=None, generate=True, width=None, height=None):
                                    if not width:
                                        width = DEFAULT_WORDCLOUD_WIDTH
                                    if not height:
                                        height= DEFAULT_WORDCLOUD_HEIGHT
                                Severity: Minor
                                Found in teamtemp/views.py - About 2 hrs 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

                                Severity
                                Category
                                Status
                                Source
                                Language