shadowproject/shadow

View on GitHub
src/qt/res/assets/plugins/footable/footable.filter.js

Summary

Maintainability
C
1 day
Test Coverage

Function Filter has 103 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function Filter() {
        var p = this;
        p.name = 'Footable Filter';
        p.init = function (ft) {
            p.footable = ft;
Severity: Major
Found in src/qt/res/assets/plugins/footable/footable.filter.js - About 4 hrs to fix

    Function init has 51 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            p.init = function (ft) {
                p.footable = ft;
                if (ft.options.filter.enabled === true) {
                    if ($(ft.table).data('filter') === false) return;
                    ft.timers.register('filter');
    Severity: Major
    Found in src/qt/res/assets/plugins/footable/footable.filter.js - About 2 hrs to fix

      Function footable_initialized.filtering has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                              'footable_initialized.filtering': function (e) {
                                  var $table = $(ft.table);
                                  var data = {
                                      'input': $table.data('filter') || ft.options.filter.input,
                                      'timeout': $table.data('filter-timeout') || ft.options.filter.timeout,
      Severity: Minor
      Found in src/qt/res/assets/plugins/footable/footable.filter.js - About 1 hr to fix

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

                p.filter = function (filterString) {
                    var ft = p.footable,
                        $table = $(ft.table),
                        minimum = $table.data('filter-minimum') || ft.options.filter.minimum,
                        clear = !filterString;
        Severity: Minor
        Found in src/qt/res/assets/plugins/footable/footable.filter.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                      if (ft.options.filter.enabled === true) {
                          if ($(ft.table).data('filter') === false) return;
                          ft.timers.register('filter');
                          $(ft.table)
                              .unbind('.filtering')
          Severity: Major
          Found in src/qt/res/assets/plugins/footable/footable.filter.js - About 40 mins to fix

            There are no issues that match your filters.

            Category
            Status