abkfenris/gage-web

View on GitHub

Showing 134 of 134 total issues

Function stickyNav has 57 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var stickyNav = (function () {
        var navBar,
            win,
            winScroll = false,
            linkScroll = false,
Severity: Major
Found in doc/_build/html/_static/js/theme.js - About 2 hrs to fix

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

        function displayNextItem() {
          // results left, load the summary and display it
          if (results.length) {
            var item = results.pop();
            var listItem = $('<li style="display:none"></li>');
    Severity: Major
    Found in doc/dead/html/_static/searchtools.js - About 2 hrs to fix

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

        Tooltip.prototype.show = function () {
          var e = $.Event('show.bs.' + this.type)
      
          if (this.hasContent() && this.enabled) {
            this.$element.trigger(e)
      Severity: Minor
      Found in app/static/js/bootstrap.js - About 2 hrs to fix

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

          performObjectSearch : function(object, otherterms) {
            var filenames = this._index.filenames;
            var objects = this._index.objects;
            var objnames = this._index.objnames;
            var titles = this._index.titles;
        Severity: Minor
        Found in doc/dead/html/_static/searchtools.js - About 2 hrs to fix

          Function initEvents has 48 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function initEvents() {
              $('a.comment-close').live("click", function(event) {
                event.preventDefault();
                hide($(this).attr('id').substring(2));
              });
          Severity: Minor
          Found in doc/dead/html/_static/websupport.js - About 1 hr to fix

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

              Carousel.prototype.slide = function (type, next) {
                var $active   = this.$element.find('.item.active')
                var $next     = next || $active[type]()
                var isCycling = this.interval
                var direction = type == 'next' ? 'left' : 'right'
            Severity: Minor
            Found in app/static/js/bootstrap.js - About 1 hr to fix

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

                function addComment(form) {
                  var node_id = form.find('input[name="node"]').val();
                  var parent_id = form.find('input[name="parent"]').val();
                  var text = form.find('textarea[name="comment"]').val();
                  var proposal = form.find('textarea[name="proposal"]').val();
              Severity: Minor
              Found in doc/dead/html/_static/websupport.js - About 1 hr to fix

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

                  $(window).on('load', function () {
                    $('[data-ride="carousel"]').each(function () {
                      var $carousel = $(this)
                      $carousel.carousel($carousel.data())
                    })
                Severity: Major
                Found in app/static/js/bootstrap.js and 1 other location - About 1 hr to fix
                app/static/js/bootstrap.js on lines 1680..1685

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

                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

                  $(window).on('load', function () {
                    $('[data-spy="scroll"]').each(function () {
                      var $spy = $(this)
                      $spy.scrollspy($spy.data())
                    })
                Severity: Major
                Found in app/static/js/bootstrap.js and 1 other location - About 1 hr to fix
                app/static/js/bootstrap.js on lines 452..457

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

                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

                        fabtools.files.upload_template(
                            LOCAL_CONFIG_DIR + '/celery-start-beat-gage',
                            '.',
                            use_sudo=True,
                            use_jinja=True,
                Severity: Major
                Found in fabfile.py and 2 other locations - About 1 hr to fix
                fabfile.py on lines 172..182
                fabfile.py on lines 230..240

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

                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

                        fabtools.files.upload_template(
                            LOCAL_CONFIG_DIR + '/celery-start-gage',
                            '.',
                            use_sudo=True,
                            use_jinja=True,
                Severity: Major
                Found in fabfile.py and 2 other locations - About 1 hr to fix
                fabfile.py on lines 172..182
                fabfile.py on lines 244..254

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

                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

                        fabtools.files.upload_template(
                            LOCAL_CONFIG_DIR + '/gunicorn-start-gage',
                            '.',
                            use_sudo=True,
                            use_jinja=True,
                Severity: Major
                Found in fabfile.py and 2 other locations - About 1 hr to fix
                fabfile.py on lines 230..240
                fabfile.py on lines 244..254

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

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

                    function keyHandler( handleObj ) {
                        // Only care when a possible input has been specified
                        if ( typeof handleObj.data !== "string" ) {
                            return;
                        }
                Severity: Minor
                Found in tmp/coverage/jquery.hotkeys.js - About 1 hr to fix

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

                    $.fn.comment = function() {
                      return this.each(function() {
                        var id = $(this).attr('id').substring(1);
                        var count = COMMENT_METADATA[id];
                        var title = count + ' comment' + (count == 1 ? '' : 's');
                  Severity: Minor
                  Found in doc/dead/html/_static/websupport.js - About 1 hr to fix

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

                    coverage.index_ready = function ($) {
                        // Look for a cookie containing previous sort settings:
                        var sort_list = [];
                        var cookie_name = "COVERAGE_INDEX_SORT";
                        var i;
                    Severity: Minor
                    Found in tmp/coverage/coverage_html.js - About 1 hr to fix

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

                      gages_regions = db.Table('gages_regions',
                          db.Column('gage', db.Integer, db.ForeignKey('gages.id')),
                          db.Column('region', db.Integer, db.ForeignKey('regions.id'))
                      Severity: Major
                      Found in app/models/gage.py and 2 other locations - About 1 hr to fix
                      app/models/river.py on lines 8..10
                      app/models/section.py on lines 12..15

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

                      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

                      sections_regions = db.Table(
                          'sections_regions',
                          db.Column('section', db.Integer, db.ForeignKey('sections.id')),
                          db.Column('region', db.Integer, db.ForeignKey('regions.id'))
                      Severity: Major
                      Found in app/models/section.py and 2 other locations - About 1 hr to fix
                      app/models/gage.py on lines 13..15
                      app/models/river.py on lines 8..10

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

                      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

                      rivers_regions = db.Table('rivers_regions',
                          db.Column('river', db.Integer, db.ForeignKey('rivers.id')),
                          db.Column('region', db.Integer, db.ForeignKey('regions.id'))
                      Severity: Major
                      Found in app/models/river.py and 2 other locations - About 1 hr to fix
                      app/models/gage.py on lines 13..15
                      app/models/section.py on lines 12..15

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

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

                        Tooltip.prototype.applyPlacement = function (offset, placement) {
                          var replace
                          var $tip   = this.tip()
                          var width  = $tip[0].offsetWidth
                          var height = $tip[0].offsetHeight
                      Severity: Minor
                      Found in app/static/js/bootstrap.js - About 1 hr to fix

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

                          function add_sidebar_button() {
                            sidebarwrapper.css({
                                'float': 'left',
                                'margin-right': '0',
                                'width': ssb_width_expanded - 28
                        Severity: Minor
                        Found in doc/dead/html/_static/sidebar.js - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language