18F/continua11y

View on GitHub

Showing 1,029 of 1,029 total issues

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

ts.storage = function(table, key, value, options) {
    table = $(table)[0];
    var cookieIndex, cookies, date,
        hasStorage = false,
        values = {},
Severity: Minor
Found in public/js/jquery.tablesorter.widgets.js - About 2 hrs to fix

    Function bindSearch has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        bindSearch: function( table, $el, internal ) {
            table = $( table )[0];
            $el = $( $el ); // allow passing a selector string
            if ( !$el.length ) { return; }
            var tmp,
    Severity: Minor
    Found in public/js/jquery.tablesorter.widgets.js - About 1 hr to fix

      Function tellGitHub has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        tellGitHub: function (githubData, travisData, overall) {
          var context = '';
          var message = '';
          var state = '';
          if (travisData.pull_request === 'false'){
      Severity: Minor
      Found in lib/reporter.js - About 1 hr to fix

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

                        if ( ( parsed || parser.type === 'numeric' ) && !isNaN( query ) &&
                            typeof data.cache !== 'undefined' ) {
                            cachedValue = data.cache;
                        } else {
                            txt = isNaN( data.iExact ) ? data.iExact.replace( ts.filter.regex.nondigit, '' ) : data.iExact;
        Severity: Major
        Found in public/js/jquery.tablesorter.widgets.js and 1 other location - About 1 hr to fix
        public/js/jquery.tablesorter.widgets.js on lines 647..652

        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 70.

        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 2 locations. Consider refactoring.
        Open

                        if ( ( parsed || c.parsers[ index ].type === 'numeric' ) && !isNaN( range1 ) && !isNaN( range2 ) ) {
                            result = data.cache;
                        } else {
                            tmp = isNaN( data.iExact ) ? data.iExact.replace( ts.filter.regex.nondigit, '' ) : data.iExact;
                            result = ts.formatFloat( tmp, table );
        Severity: Major
        Found in public/js/jquery.tablesorter.widgets.js and 1 other location - About 1 hr to fix
        public/js/jquery.tablesorter.widgets.js on lines 579..585

        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 70.

        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 exports has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        module.exports = function(sequelize, DataTypes) {
            var Url = sequelize.define('Url', {
                path: {
                    type: DataTypes.STRING,
                    unique: 'urlIndex'
        Severity: Minor
        Found in models/Url.js - About 1 hr to fix

          Function get has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          exports.get = function (req, res){
              var reqRepo = req.params.repo.replace('.html','');
              models.Repo.findOne({
                  where: {
                      repoName: {
          Severity: Minor
          Found in routes/repo.js - About 1 hr to fix

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

                checkFilters: function( table, filter, skipFirst ) {
                    var c = table.config,
                        wo = c.widgetOptions,
                        filterArray = $.isArray( filter ),
                        filters = ( filterArray ) ? filter : ts.getFilters( table, true ),
            Severity: Minor
            Found in public/js/jquery.tablesorter.widgets.js - About 1 hr to fix

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

                  multipleColumns: function( c, $input ) {
                      // look for multiple columns '1-3,4-6,8' in data-column
                      var temp, ranges, range, start, end, singles, i, indx, len,
                          wo = c.widgetOptions,
                          // only target 'all' column inputs on initialization
              Severity: Minor
              Found in public/js/jquery.tablesorter.widgets.js - About 1 hr to fix

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

                    format: function(table, c, wo) {
                        var $tbody, tbodyIndex, $rows, rows, $row, $cells, remove, indx,
                            $table = c.$table,
                            $tbodies = c.$tbodies,
                            sortList = c.sortList,
                Severity: Minor
                Found in public/js/jquery.tablesorter.widgets.js - About 1 hr to fix

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

                  ts.addHeaderResizeEvent = function(table, disable, settings) {
                      table = $(table)[0]; // make sure we're using a dom element
                      if ( !table.config ) { return; }
                      var defaults = {
                              timer : 250
                  Severity: Minor
                  Found in public/js/jquery.tablesorter.widgets.js - About 1 hr to fix

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                        models.Repo.findOne({
                            where: {
                                repoName: req.params.account+'/'+req.params.repo,
                            },
                            order: [['updatedAt', 'DESC']]
                    Severity: Major
                    Found in routes/badge.js and 1 other location - About 1 hr to fix
                    routes/api.js on lines 6..29

                    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 64.

                    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

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                        models.Repo.findOne({
                            where: {
                                repoName: req.params.account+'/'+req.params.repo,
                            },
                            order: [['updatedAt', 'DESC']]
                    Severity: Major
                    Found in routes/api.js and 1 other location - About 1 hr to fix
                    routes/badge.js on lines 7..58

                    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 64.

                    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 format has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        format: function(table, c, wo, init) {
                            var stored, time,
                                $table = c.$table,
                                saveSort = wo.saveSort !== false, // make saveSort active/inactive; default to true
                                sortList = { "sortList" : c.sortList };
                    Severity: Minor
                    Found in public/js/jquery.tablesorter.widgets.js - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                                  } else if ( this.value !== '' && (
                                      // liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace
                                      ( typeof wo.filter_liveSearch === 'number' && this.value.length < wo.filter_liveSearch ) ||
                                      // let return & backspace continue on, but ignore arrows & non-valid characters
                                      ( event.which !== 13 && event.which !== 8 &&
                      Severity: Critical
                      Found in public/js/jquery.tablesorter.widgets.js - About 1 hr to fix

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

                          start: function (githubData, travisData) {
                            // temporary fix for numbered pull requests
                            // TODO: handle this in continua11y script instead
                            var pullRequest;
                            if (travisData.pull_request === 'false') {
                        Severity: Minor
                        Found in lib/reporter.js - About 1 hr to fix

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

                          module.exports = function(sequelize, DataTypes) {
                              var Repo = sequelize.define('Repo', {
                                  repo: {
                                      type: DataTypes.INTEGER,
                                      unique: true
                          Severity: Minor
                          Found in models/Repo.js - About 1 hr to fix

                            Function operators has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    operators: function( c, data ) {
                                        // ignore empty strings... because '' < 10 is true
                                        if ( /^[<>]=?/.test( data.iFilter ) && data.iExact !== '' ) {
                                            var cachedValue, result, txt,
                                                table = c.table,
                            Severity: Minor
                            Found in public/js/jquery.tablesorter.widgets.js - About 1 hr to fix

                              Function hideFilters has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  hideFilters: function( table, c ) {
                                      var timer;
                                      c.$table
                                          .find( '.' + tscss.filterRow )
                                          .bind( 'mouseenter mouseleave', function( e ) {
                              Severity: Minor
                              Found in public/js/jquery.tablesorter.widgets.js - About 1 hr to fix

                                Function mouseMove has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    mouseMove : function( c, wo, event ) {
                                        if ( wo.resizable_.mouseXPosition === 0 || !wo.resizable_.$target ) { return; }
                                        // resize columns
                                        var column,
                                            total = 0,
                                Severity: Minor
                                Found in public/js/jquery.tablesorter.widgets.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language