quangoinc/realtime_qa

View on GitHub

Showing 63 of 63 total issues

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

      var $this = $(this)
        , data = $this.data('collapse')
        , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
Severity: Major
Found in app/assets/javascripts/bootstrap/bootstrap.js and 1 other location - About 1 hr to fix
app/assets/javascripts/bootstrap/bootstrap.js on lines 262..264

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

  , show: function () {
      var $tip
        , pos
        , actualWidth
        , actualHeight
Severity: Minor
Found in app/assets/javascripts/bootstrap/bootstrap.js - About 1 hr to fix

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

      function performSearch(data, regexps, queries, highlighters, state) {
        var searchIndex = data.searchIndex;
        var longSearchIndex = data.longSearchIndex;
        var info = data.info;
        var result = [];
    Severity: Minor
    Found in doc/app/js/searcher.js - About 1 hr to fix

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

            case 38: //Event.KEY_UP:
              if (e.keyCode == 38 || e.ctrlKey) {
                if (this.moveUp()) e.preventDefault();
                this.startMoveTimeout(false);
              }
      Severity: Major
      Found in doc/app/js/navigation.js and 1 other location - About 1 hr to fix
      doc/app/js/navigation.js on lines 55..60

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

      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

            case 40: //Event.KEY_DOWN:
              if (e.keyCode == 40 || e.ctrlKey) {
                if (this.moveDown()) e.preventDefault();
                this.startMoveTimeout(true);
              }
      Severity: Major
      Found in doc/app/js/navigation.js and 1 other location - About 1 hr to fix
      doc/app/js/navigation.js on lines 46..51

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

      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

                $.support.transition && this.$element.hasClass('fade')?
                  this.$backdrop.one($.support.transition.end, callback) :
                  callback()
      Severity: Major
      Found in app/assets/javascripts/bootstrap/bootstrap.js and 1 other location - About 1 hr to fix
      app/assets/javascripts/bootstrap/bootstrap.js on lines 1689..1691

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

      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

            $.support.transition && this.$element.hasClass('collapse') ?
              this.$element.one($.support.transition.end, complete) :
              complete()
      Severity: Major
      Found in app/assets/javascripts/bootstrap/bootstrap.js and 1 other location - About 1 hr to fix
      app/assets/javascripts/bootstrap/bootstrap.js on lines 244..246

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

      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

        def create
          @issue_note = IssueNote.new(params[:issue_note])
          @issue_note.logged_by = current_user
      
          respond_to do |format|
      Severity: Major
      Found in app/controllers/issue_notes_controller.rb and 1 other location - About 1 hr to fix
      app/controllers/issues_controller.rb on lines 42..52

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

      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

        def create
          @issue = Issue.new(params[:issue])
          @issue.logged_by = current_user
      
          respond_to do |format|
      Severity: Major
      Found in app/controllers/issues_controller.rb and 1 other location - About 1 hr to fix
      app/controllers/issue_notes_controller.rb on lines 42..52

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

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

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

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

          def create
            @project = Project.new(params[:project])
        
            respond_to do |format|
              if @project.save
        Severity: Major
        Found in app/controllers/projects_controller.rb and 1 other location - About 1 hr to fix
        app/controllers/client_project_assignments_controller.rb on lines 42..51

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

        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

          def create
            @client_project_assignment = ClientProjectAssignment.new(params[:client_project_assignment])
        
            respond_to do |format|
              if @client_project_assignment.save
        Severity: Major
        Found in app/controllers/client_project_assignments_controller.rb and 1 other location - About 1 hr to fix
        app/controllers/projects_controller.rb on lines 42..51

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

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

          this.onkeydown = function(e) {
            if (!this.navigationActive) return;
            switch(e.keyCode) {
              case 37: //Event.KEY_LEFT:
                if (this.moveLeft()) e.preventDefault();
        Severity: Minor
        Found in doc/app/js/navigation.js - About 1 hr to fix

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

            def update
              @issue_note = IssueNote.find(params[:id])
          
              respond_to do |format|
                if @issue_note.update_attributes(params[:issue_note])
          Severity: Major
          Found in app/controllers/issue_notes_controller.rb and 4 other locations - About 1 hr to fix
          app/controllers/client_project_assignments_controller.rb on lines 58..67
          app/controllers/deliverables_controller.rb on lines 59..68
          app/controllers/issues_controller.rb on lines 59..68
          app/controllers/projects_controller.rb on lines 58..67

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

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

            def update
              @project = Project.find(params[:id])
          
              respond_to do |format|
                if @project.update_attributes(params[:project])
          Severity: Major
          Found in app/controllers/projects_controller.rb and 4 other locations - About 1 hr to fix
          app/controllers/client_project_assignments_controller.rb on lines 58..67
          app/controllers/deliverables_controller.rb on lines 59..68
          app/controllers/issue_notes_controller.rb on lines 59..68
          app/controllers/issues_controller.rb on lines 59..68

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

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

            def update
              @issue = Issue.find(params[:id])
          
              respond_to do |format|
                if @issue.update_attributes(params[:issue])
          Severity: Major
          Found in app/controllers/issues_controller.rb and 4 other locations - About 1 hr to fix
          app/controllers/client_project_assignments_controller.rb on lines 58..67
          app/controllers/deliverables_controller.rb on lines 59..68
          app/controllers/issue_notes_controller.rb on lines 59..68
          app/controllers/projects_controller.rb on lines 58..67

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

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

            def update
              @deliverable = Deliverable.find(params[:id])
          
              respond_to do |format|
                if @deliverable.update_attributes(params[:deliverable])
          Severity: Major
          Found in app/controllers/deliverables_controller.rb and 4 other locations - About 1 hr to fix
          app/controllers/client_project_assignments_controller.rb on lines 58..67
          app/controllers/issue_notes_controller.rb on lines 59..68
          app/controllers/issues_controller.rb on lines 59..68
          app/controllers/projects_controller.rb on lines 58..67

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

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

            def update
              @client_project_assignment = ClientProjectAssignment.find(params[:id])
          
              respond_to do |format|
                if @client_project_assignment.update_attributes(params[:client_project_assignment])
          Severity: Major
          Found in app/controllers/client_project_assignments_controller.rb and 4 other locations - About 1 hr to fix
          app/controllers/deliverables_controller.rb on lines 59..68
          app/controllers/issue_notes_controller.rb on lines 59..68
          app/controllers/issues_controller.rb on lines 59..68
          app/controllers/projects_controller.rb on lines 58..67

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

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

            , keydown: function (e) {
                var $this
                  , $items
                  , $active
                  , $parent
          Severity: Minor
          Found in app/assets/javascripts/bootstrap/bootstrap.js - About 1 hr to fix

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

                  this.timeout = setTimeout(function() {
                    if (self.hoverState == 'in') self.show()
                  }, self.options.delay.show)
            Severity: Major
            Found in app/assets/javascripts/bootstrap/bootstrap.js and 1 other location - About 1 hr to fix
            app/assets/javascripts/bootstrap/bootstrap.js on lines 889..891

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

            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

            Severity
            Category
            Status
            Source
            Language