ioquatix/financier

View on GitHub

Showing 280 of 590 total issues

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

    dispatch: function( nativeEvent ) {

        var i, j, ret, matched, handleObj, handlerQueue,
            args = new Array( arguments.length ),

Severity: Minor
Found in public/_components/jquery/jquery.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 public/_components/jquery/jquery.js - About 1 hr to fix

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

      function adjustCSS( elem, prop, valueParts, tween ) {
          var adjusted, scale,
              maxIterations = 20,
              currentValue = tween ?
                  function() {
      Severity: Minor
      Found in public/_components/jquery/jquery.slim.js - About 1 hr to fix

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

            dispatch: function( nativeEvent ) {
        
                var i, j, ret, matched, handleObj, handlerQueue,
                    args = new Array( arguments.length ),
        
        
        Severity: Minor
        Found in public/_components/jquery/jquery.slim.js - About 1 hr to fix

          Function access has 41 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 public/_components/jquery/jquery.slim.js - About 1 hr to fix

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

                style: function( elem, name, value, extra ) {
            
                    // Don't set styles on text and comment nodes
                    if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
                        return;
            Severity: Minor
            Found in public/_components/jquery/jquery.slim.js - About 1 hr to fix

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

                  toggleClass: function( value, stateVal ) {
                      var type = typeof value,
                          isValidValue = type === "string" || Array.isArray( value );
              
                      if ( typeof stateVal === "boolean" && isValidValue ) {
              Severity: Minor
              Found in public/_components/jquery/jquery.js - About 1 hr to fix

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

                    setOffset: function( elem, options, i ) {
                        var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
                            position = jQuery.css( elem, "position" ),
                            curElem = jQuery( elem ),
                            props = {};
                Severity: Minor
                Found in public/_components/jquery/jquery.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 public/_components/jquery/jquery.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 public/_components/jquery/jquery.slim.js - About 1 hr to fix

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

                          toggleClass: function( value, stateVal ) {
                              var type = typeof value,
                                  isValidValue = type === "string" || Array.isArray( value );
                      
                              if ( typeof stateVal === "boolean" && isValidValue ) {
                      Severity: Minor
                      Found in public/_components/jquery/jquery.slim.js - About 1 hr to fix

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

                            setOffset: function( elem, options, i ) {
                                var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
                                    position = jQuery.css( elem, "position" ),
                                    curElem = jQuery( elem ),
                                    props = {};
                        Severity: Minor
                        Found in public/_components/jquery/jquery.slim.js - About 1 hr to fix

                          Method import_csv has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def import_csv(path)
                              Financier::DB.commit(message: "Import CSV Transactions") do |dataset|
                                  CSV.foreach(path, :headers => true, :header_converters => :symbol, :converters => [:blank_to_nil]) do |row|
                                      transaction = Financier::Account::Transaction.create(dataset)
                                      
                          Severity: Minor
                          Found in pages/accounts/controller.rb - 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 createChartRect has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            Chartist.createChartRect = function (svg, options, fallbackPadding) {
                              var hasAxis = !!(options.axisX || options.axisY);
                              var yAxisOffset = hasAxis ? options.axisY.offset : 0;
                              var xAxisOffset = hasAxis ? options.axisX.offset : 0;
                              // If width or height results in invalid value (including 0) we fallback to the unitless settings or even 0
                          Severity: Minor
                          Found in public/_components/chartist/chartist.js - About 1 hr to fix

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

                              Chartist.Interpolation.simple = function(options) {
                                var defaultOptions = {
                                  divisor: 2,
                                  fillHoles: false
                                };
                            Severity: Minor
                            Found in public/_components/chartist/chartist.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 public/_components/jquery/jquery.js - About 1 hr to fix

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

                                                                mightThrow = function() {
                                                                    var returned, then;
                                
                                                                    // Support: Promises/A+ section 2.3.3.3.3
                                                                    // https://promisesaplus.com/#point-59
                                Severity: Minor
                                Found in public/_components/jquery/jquery.js - About 1 hr to fix

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

                                  function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
                                      var i = dimension === "width" ? 1 : 0,
                                          extra = 0,
                                          delta = 0;
                                  
                                  
                                  Severity: Minor
                                  Found in public/_components/jquery/jquery.js - About 1 hr to fix

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

                                    function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
                                        var i = dimension === "width" ? 1 : 0,
                                            extra = 0,
                                            delta = 0;
                                    
                                    
                                    Severity: Minor
                                    Found in public/_components/jquery/jquery.slim.js - About 1 hr to fix

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

                                                                      mightThrow = function() {
                                                                          var returned, then;
                                      
                                                                          // Support: Promises/A+ section 2.3.3.3.3
                                                                          // https://promisesaplus.com/#point-59
                                      Severity: Minor
                                      Found in public/_components/jquery/jquery.slim.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language