mangroveorg/datawinners

View on GitHub

Showing 1,567 of 3,608 total issues

File jquery.dataTables.js has 6221 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*! DataTables 1.10.9
 * ©2008-2015 SpryMedia Ltd - datatables.net/license
 */

/**
Severity: Major
Found in datawinners/media/javascript/data_tables/js/jquery.dataTables.js - About 2 wks to fix

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

    /*!
     * jQuery JavaScript Library v2.0.3
     * http://jquery.com/
     *
     * Includes Sizzle.js

      File jquery-ui-1.8.13.custom.min.js has 5496 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*!
       * jQuery UI 1.8.13
       *
       * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
       * Dual licensed under the MIT or GPL Version 2 licenses.
      Severity: Major
      Found in datawinners/media/javascript/jqueryUI/jquery-ui-1.8.13.custom.min.js - About 2 wks to fix

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

        /*!
         * jQuery JavaScript Library v1.4.2
         * http://jquery.com/
         *
         * Copyright 2010, John Resig
        Severity: Major
        Found in datawinners/media/admin/js/jquery.js - About 1 wk to fix

          Function dataTable has 2113 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              i.fn.dataTable = function (g) {
                  function l() {
                      this.fnRecordsTotal =
                          function () {
                              return this.oFeatures.bServerSide ? parseInt(this._iRecordsTotal, 10) : this.aiDisplayMaster.length

            File knockout-latest.debug.js has 3123 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            // Knockout JavaScript library v3.0.0
            // (c) Steven Sanderson - http://knockoutjs.com/
            // License: MIT (http://www.opensource.org/licenses/mit-license.php)
            
            (function(){

              File jquery.dataTables.min.js has 2350 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /*
               * File:        jquery.dataTables.min.js
               * Version:     1.8.0
               * Author:      Allan Jardine (www.sprymedia.co.uk)
               * Info:        www.datatables.net
              Severity: Major
              Found in datawinners/media/javascript/data_tables/js/jquery.dataTables.min.js - About 6 days to fix

                File qunit-1.12.0.js has 1607 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /**
                 * QUnit v1.12.0 - A JavaScript Unit Testing Framework
                 *
                 * http://qunitjs.com
                 *

                  `` has 196 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  intellisense.annotate(jQuery.fn, {
                    'add': function() {
                      /// <signature>
                      ///   <summary>Add elements to the set of matched elements.</summary>
                      ///   <param name="selector" type="String">A string representing a selector expression to find additional elements to add to the set of matched elements.</param>

                    Function jQuery_vsprintf has a Cognitive Complexity of 191 (exceeds 5 allowed). Consider refactoring.
                    Open

                    jQuery.vsprintf = function jQuery_vsprintf( format, args ) {
                        if( format == null ) {
                            throw "Not enough arguments for vsprintf";
                        }
                        if( args == null ) {
                    Severity: Minor
                    Found in datawinners/media/javascript/jquery.sprintf.js - About 3 days 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

                    File ut_couch_fixtures.py has 1427 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
                    from datetime import datetime, timedelta
                    from dateutil.relativedelta import relativedelta
                    
                    from django.contrib.auth.models import User
                    Severity: Major
                    Found in datawinners/main/ut_couch_fixtures.py - About 3 days to fix

                      File country_networks_fr.js has 1191 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      var country = new Array();
                      country["Abkhazie"] = new Array("Aquafon");
                      country["Afghanistan"] = new Array("Areeba (MTN Afghanistan)",
                          "AWCC (Afghan Wireless Communication Company)",
                          "Etisalat Afghanistan",
                      Severity: Major
                      Found in datawinners/media/javascript/home/country_networks_fr.js - About 3 days to fix

                        File country_networks_en.js has 1191 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        var country = new Array();
                        country["Abkhazia"] = new Array("Aquafon");
                        country["Afghanistan"] = new Array("Areeba (MTN Afghanistan)",
                            "AWCC (Afghan Wireless Communication Company)",
                            "Etisalat Afghanistan",
                        Severity: Major
                        Found in datawinners/media/javascript/home/country_networks_en.js - About 3 days to fix

                          Function factory has 542 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          var factory = function( $, DataTable ) {
                          "use strict";
                          
                          /**
                           * ColVis provides column visibility control for DataTables
                          Severity: Major
                          Found in datawinners/media/javascript/data_tables/js/dataTables.colVis.js - About 2 days to fix

                            Function api has a Cognitive Complexity of 132 (exceeds 5 allowed). Consider refactoring.
                            Open

                            var api = (function () {
                            
                                var isInitialized = 0,
                                    configuration = ko.validation.configuration,
                                    utils = ko.validation.utils;
                            Severity: Minor
                            Found in datawinners/media/javascript/Knockout-Validation/Src/api.js - About 2 days 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 TextNTags has 534 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                var TextNTags = function (editor) {
                                    var settings = null, templates;
                                    var elContainer, elEditor, elBeautifier, elTagList, elTagListItemActive;
                                    var tagsCollection;
                                    var currentTriggerChar, currentDataQuery;
                            Severity: Major
                            Found in datawinners/media/javascript/jquery-textntags/jquery-textntags.js - About 2 days to fix

                              Function _get_visible_headers has a Cognitive Complexity of 124 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def _get_visible_headers(self, precomputed_excel_headers, process_preferences=[], is_single_sheet=False, search_start_index={'index': 0}):
                              
                                      excel_headers = OrderedDict()
                                      for preference in process_preferences:
                                          if preference.get('visibility') or preference.has_key('children'):
                              Severity: Minor
                              Found in datawinners/blue/xform_submission_exporter.py - About 2 days 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

                              File jquery.validate.js has 926 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /**
                               * jQuery Validation Plugin 1.8.1
                               *
                               * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
                               * http://docs.jquery.com/Plugins/Validation
                              Severity: Major
                              Found in datawinners/media/javascript/jquery.validate.js - About 2 days to fix

                                File knockout.validation.js has 922 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                /*=============================================================================
                                    Author:            Eric M. Barnard - @ericmbarnard                                
                                    License:        MIT (http://opensource.org/licenses/mit-license.php)        
                                                                                                                
                                    Description:    Validation Library for KnockoutJS                            

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

                                  # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
                                  import json
                                  import datetime
                                  import logging
                                  
                                  
                                  Severity: Major
                                  Found in datawinners/project/views/views.py - About 2 days to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language