abkfenris/gage-web

View on GitHub

Showing 47 of 134 total issues

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

      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

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

            function handleVote(link) {
              if (!opts.voting) {
                showError("You'll need to login to vote.");
                return;
              }
          Severity: Minor
          Found in doc/dead/html/_static/websupport.js - About 1 hr to fix

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

              performTermsSearch : function(searchterms, excluded, terms, score) {
                var filenames = this._index.filenames;
                var titles = this._index.titles;
            
                var i, j, file, files;
            Severity: Minor
            Found in doc/dead/html/_static/searchtools.js - About 1 hr to fix

              Function index_ready has a Cognitive Complexity of 12 (exceeds 5 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

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

                      handleObj.handler = function( event ) {
                          // Don't fire in text-accepting inputs that we didn't directly bind to
                          if ( this !== event.target && (/textarea|select/i.test( event.target.nodeName ) ||
                               event.target.type === "text") ) {
                              return;
              Severity: Minor
              Found in tmp/coverage/jquery.hotkeys.js - About 1 hr to fix

                Function SphinxRtdTheme has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                window.SphinxRtdTheme = (function (jquery) {
                    var stickyNav = (function () {
                        var navBar,
                            win,
                            winScroll = false,
                Severity: Minor
                Found in doc/_build/html/_static/js/theme.js - 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 show has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  Modal.prototype.show = function (_relatedTarget) {
                    var that = this
                    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
                
                    this.$element.trigger(e)
                Severity: Minor
                Found in app/static/js/bootstrap.js - About 1 hr to fix

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

                    Collapse.prototype.show = function () {
                      if (this.transitioning || this.$element.hasClass('in')) return
                  
                      var startEvent = $.Event('show.bs.collapse')
                      this.$element.trigger(startEvent)
                  Severity: Minor
                  Found in app/static/js/bootstrap.js - About 1 hr to fix

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

                    coverage.select_line_or_chunk = function (lineno) {
                        var c = coverage;
                        var probe_line = c.line_elt(lineno);
                        if (probe_line.length === 0) {
                            return;
                    Severity: Minor
                    Found in tmp/coverage/coverage_html.js - About 1 hr to fix

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

                        function deleteComment(id) {
                          $.ajax({
                            type: 'POST',
                            url: opts.deleteCommentURL,
                            data: {id: id},
                      Severity: Minor
                      Found in doc/dead/html/_static/websupport.js - About 1 hr to fix

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

                          Modal.prototype.backdrop = function (callback) {
                            var animate = this.$element.hasClass('fade') ? 'fade' : ''
                        
                            if (this.isShown && this.options.backdrop) {
                              var doAnimate = $.support.transition && animate
                        Severity: Minor
                        Found in app/static/js/bootstrap.js - About 1 hr to fix

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

                            Affix.prototype.checkPosition = function () {
                              if (!this.$element.is(':visible')) return
                          
                              var scrollHeight = $(document).height()
                              var scrollTop    = this.$window.scrollTop()
                          Severity: Minor
                          Found in app/static/js/bootstrap.js - About 1 hr to fix

                            Function select_line_or_chunk has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                            Open

                            coverage.select_line_or_chunk = function (lineno) {
                                var c = coverage;
                                var probe_line = c.line_elt(lineno);
                                if (probe_line.length === 0) {
                                    return;
                            Severity: Minor
                            Found in tmp/coverage/coverage_html.js - 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 getComments has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              function getComments(id) {
                                $.ajax({
                                 type: 'GET',
                                 url: opts.getCommentsURL,
                                 data: {node: id},
                            Severity: Minor
                            Found in doc/dead/html/_static/websupport.js - About 1 hr to fix

                              Function SphinxRtdTheme has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              window.SphinxRtdTheme = (function (jquery) {
                                  var stickyNav = (function () {
                                      var navBar,
                                          win,
                                          stickyNavCssClass = 'stickynav',
                              Severity: Minor
                              Found in doc/dead/html/_static/js/theme.js - About 1 hr to fix

                                Function activate has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  Tab.prototype.activate = function (element, container, callback) {
                                    var $active    = container.find('> .active')
                                    var transition = callback
                                      && $.support.transition
                                      && $active.hasClass('fade')
                                Severity: Minor
                                Found in app/static/js/bootstrap.js - About 1 hr to fix

                                  Function add_new_sample has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  def add_new_sample(sensor_id, dt, svalue, deltaminutes=10):
                                      """
                                      Adds a new sample with an associacted remote sensor
                                      if there hasn't been a sample recorded within the last deltaminutes
                                      (default is 10).
                                  Severity: Minor
                                  Found in app/remote/base.py - About 55 mins 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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language