18F/continua11y

View on GitHub

Showing 1,029 of 1,029 total issues

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

/*** This file is dynamically generated ***
█████▄ ▄████▄   █████▄ ▄████▄ ██████   ███████▄ ▄████▄ █████▄ ██ ██████ ██  ██
██  ██ ██  ██   ██  ██ ██  ██   ██     ██ ██ ██ ██  ██ ██  ██ ██ ██     ██  ██
██  ██ ██  ██   ██  ██ ██  ██   ██     ██ ██ ██ ██  ██ ██  ██ ██ ██▀▀   ▀▀▀▀██
█████▀ ▀████▀   ██  ██ ▀████▀   ██     ██ ██ ██ ▀████▀ █████▀ ██ ██     █████▀
Severity: Major
Found in public/js/jquery.tablesorter.widgets.js - About 6 days to fix

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

            models.Commit.create({
                branch: 'release',
                pullRequest: false,
                latest: false,
                commit: 'n839vt90289138uv01861834u509345',
    Severity: Major
    Found in lib/seed.js and 2 other locations - About 1 day to fix
    lib/seed.js on lines 101..142
    lib/seed.js on lines 153..194

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 291.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

            models.Commit.create({
                branch: 'feature',
                pullRequest: true,
                latest: true,
                commit: '943gqireavg3qireab3i4quhreh32r4',
    Severity: Major
    Found in lib/seed.js and 2 other locations - About 1 day to fix
    lib/seed.js on lines 17..58
    lib/seed.js on lines 153..194

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 291.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

            models.Commit.create({
                branch: 'develop',
                pullRequest: false,
                latest: true,
                commit: '79283i4rgh983h4owaadfalh8394894',
    Severity: Major
    Found in lib/seed.js and 2 other locations - About 1 day to fix
    lib/seed.js on lines 17..58
    lib/seed.js on lines 101..142

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 291.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function seed has 188 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var seed = function () {
        models.Repo.create({
            repo: 1234567,
            repoName: 'test/one',
            defaultBranch: 'release',
    Severity: Major
    Found in lib/seed.js - About 7 hrs to fix

      Function findRows has 179 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          findRows: function( table, filters, combinedFilters ) {
              if ( table.config.lastCombinedFilter === combinedFilters ||
                  !table.config.widgetOptions.filter_initialized ) {
                  return;
              }
      Severity: Major
      Found in public/js/jquery.tablesorter.widgets.js - About 7 hrs to fix

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

            init: function( table, c, wo ) {
                // filter language options
                ts.language = $.extend( true, {}, {
                    to  : 'to',
                    or  : 'or',
        Severity: Major
        Found in public/js/jquery.tablesorter.widgets.js - About 6 hrs to fix

          Function format has 155 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              format: function(table, c, wo) {
                  // filter widget doesn't initialize on an empty table. Fixes #449
                  if ( c.$table.hasClass('hasStickyHeaders') || ($.inArray('filter', c.widgets) >= 0 && !c.$table.hasClass('hasFilters')) ) {
                      return;
                  }
          Severity: Major
          Found in public/js/jquery.tablesorter.widgets.js - About 6 hrs to fix

            Function processRow has 112 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                processRow: function( c, data, vars ) {
                    var columnIndex, hasSelect, result, val, filterMatched,
                        fxn, ffxn, txt,
                        regex = ts.filter.regex,
                        wo = c.widgetOptions,
            Severity: Major
            Found in public/js/jquery.tablesorter.widgets.js - About 4 hrs to fix

              Function format has 91 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  format: function(table, c, wo) {
                      var i, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
                          themesAll = ts.themes,
                          $table = c.$table.add( $( c.namespace + '_extra_table' ) ),
                          $headers = c.$headers.add( $( c.namespace + '_extra_headers' ) ),
              Severity: Major
              Found in public/js/jquery.tablesorter.widgets.js - About 3 hrs to fix

                Consider simplifying this complex logical expression.
                Open

                                if ( searchFiltered ) {
                                    // cycle through all filters; include last ( columnIndex + 1 = match any column ). Fixes #669
                                    for ( indx = 0; indx < columnIndex + 1; indx++ ) {
                                        val = filters[indx] || '';
                                        // break out of loop if we've already determined not to search filtered rows
                Severity: Critical
                Found in public/js/jquery.tablesorter.widgets.js - About 3 hrs to fix

                  Function getFilters has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  ts.getFilters = function( table, getRaw, setFilters, skipFirst ) {
                      var i, $filters, $column, cols,
                          filters = false,
                          c = table ? $( table )[0].config : '',
                          wo = c ? c.widgetOptions : '';
                  Severity: Major
                  Found in public/js/jquery.tablesorter.widgets.js - About 2 hrs to fix

                    Function buildRow has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        buildRow: function( table, c, wo ) {
                            var col, column, $header, buildSelect, disabled, name, ffxn, tmp,
                                // c.columns defined in computeThIndexes()
                                cellFilter = wo.filter_cellFilter,
                                columns = c.columns,
                    Severity: Major
                    Found in public/js/jquery.tablesorter.widgets.js - About 2 hrs to fix

                      Function getOptionSource has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          getOptionSource: function( table, column, onlyAvail ) {
                              table = $( table )[0];
                              var cts, txt, indx, len,
                                  c = table.config,
                                  wo = c.widgetOptions,
                      Severity: Major
                      Found in public/js/jquery.tablesorter.widgets.js - About 2 hrs to fix

                        Function bindings has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            bindings : function( c, wo ) {
                                var namespace = c.namespace + 'tsresize';
                                wo.$resizable_container.children().bind( 'mousedown', function( event ) {
                                    // save header cell and mouse position
                                    var column,
                        Severity: Major
                        Found in public/js/jquery.tablesorter.widgets.js - About 2 hrs to fix

                          Function buildSelect has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              buildSelect: function( table, column, arry, updating, onlyAvail ) {
                                  table = $( table )[0];
                                  column = parseInt( column, 10 );
                                  if ( !table.config.cache || $.isEmptyObject( table.config.cache ) ) {
                                      return;
                          Severity: Major
                          Found in public/js/jquery.tablesorter.widgets.js - About 2 hrs to fix

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

                                init : function( c, wo ) {
                                    if ( c.$table.hasClass( 'hasResizable' ) ) { return; }
                                    c.$table.addClass( 'hasResizable' );
                            
                                    var noResize, $header, column, storedSizes, tmp,
                            Severity: Major
                            Found in public/js/jquery.tablesorter.widgets.js - About 2 hrs to fix

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

                              module.exports = function(sequelize, DataTypes) {
                                  var Commit = sequelize.define('Commit', {
                                      branch: {
                                          type: DataTypes.STRING
                                      },
                              Severity: Major
                              Found in models/Commit.js - About 2 hrs to fix

                                Consider simplifying this complex logical expression.
                                Open

                                        if (!$table.hasClass('tablesorter-' + theme) || c.theme !== c.appliedTheme || !wo.uitheme_applied) {
                                            wo.uitheme_applied = true;
                                            oldtheme = themesAll[c.appliedTheme] || {};
                                            hasOldTheme = !$.isEmptyObject(oldtheme);
                                            oldremove =  hasOldTheme ? [ oldtheme.sortNone, oldtheme.sortDesc, oldtheme.sortAsc, oldtheme.active ].join( ' ' ) : '';
                                Severity: Critical
                                Found in public/js/jquery.tablesorter.widgets.js - About 2 hrs to fix

                                  Function make has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  exports.make = function (req, res){
                                      models.Repo.findOne({
                                          where: {
                                              repoName: req.params.account+'/'+req.params.repo,
                                          },
                                  Severity: Minor
                                  Found in routes/badge.js - About 2 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language