concord-consortium/rigse

View on GitHub

Showing 2,136 of 2,138 total issues

Function select has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  select = Sizzle.select = function( selector, context, results, seed ) {
    var i, tokens, token, type, find,
      compiled = typeof selector === "function" && selector,
      match = !seed && tokenize( (selector = compiled.selector || selector) );

Severity: Minor
Found in rails/app/assets/javascripts/prototype.js - About 1 hr to fix

    Function render has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      render () {
        const { bookmark } = this.props;
        const { editing } = this.state;
    
        const handleDelete = () => this.props.handleDelete(bookmark);

      Function renderHeader has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        renderHeader () {
          let wrapperClass = "theme-" + this.state.theme;
          wrapperClass = this.state.loggedIn ? wrapperClass + " logged-in" : wrapperClass;
          let navLinks = "";
          if (this.state.windowWidth > 950 || !this.state.nav_menu_collapsed) {
      Severity: Minor
      Found in rails/react-components/src/library/components/page-header.tsx - About 1 hr to fix

        Function renderForm has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          renderForm () {
            const { externalReports, portalToken } = this.props;
            const { queryParams, externalReportButtonDisabled } = this.state;
            const queryUrl = Portal.API_V1.EXTERNAL_RESEARCHER_REPORT_USER_QUERY;
        
        

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

            setTheme: function(theme, windowManagerTheme) {
              this.element.removeClassName(this.getTheme()).addClassName(theme);
              // window has it's own theme
              if (!windowManagerTheme)
                this.options.theme = theme;
          Severity: Major
          Found in rails/public/javascripts/light_box.js and 2 other locations - About 1 hr to fix
          rails/app/assets/javascripts/livepipe/window.js on lines 2032..2039
          rails/app/assets/javascripts/prototype-ui/prototype-ui.js on lines 3789..3796

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

          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

            var oldStyle = {
              top: element.style.top,
              left: element.style.left,
              height: element.style.height,
              width: element.style.width,
          Severity: Major
          Found in rails/app/assets/javascripts/effects.js and 1 other location - About 1 hr to fix
          rails/app/assets/javascripts/effects.js on lines 833..838

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

          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

            var oldStyle = {
              top: element.style.top,
              left: element.style.left,
              height: element.style.height,
              width: element.style.width,
          Severity: Major
          Found in rails/app/assets/javascripts/effects.js and 1 other location - About 1 hr to fix
          rails/app/assets/javascripts/effects.js on lines 759..764

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

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

            setTheme: function(theme, windowManagerTheme) {
              this.element.removeClassName(this.getTheme()).addClassName(theme);
              // window has it's own theme
              if (!windowManagerTheme)
                this.options.theme = theme;
          Severity: Major
          Found in rails/app/assets/javascripts/prototype-ui/prototype-ui.js and 2 other locations - About 1 hr to fix
          rails/app/assets/javascripts/livepipe/window.js on lines 2032..2039
          rails/public/javascripts/light_box.js on lines 3789..3796

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

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

            setTheme: function(theme, windowManagerTheme) {
              this.element.removeClassName(this.getTheme()).addClassName(theme);
              // window has it's own theme
              if (!windowManagerTheme)
                this.options.theme = theme;
          Severity: Major
          Found in rails/app/assets/javascripts/livepipe/window.js and 2 other locations - About 1 hr to fix
          rails/app/assets/javascripts/prototype-ui/prototype-ui.js on lines 3789..3796
          rails/public/javascripts/light_box.js on lines 3789..3796

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

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

            showError (err: any, message: any) {
              if (err.message) {
                window.alert(`${message}\n${err.message}`);
              } else {
                window.alert(message);
          rails/react-components/src/library/components/bookmarks/edit.tsx on lines 105..111
          rails/react-components/src/library/components/portal-classes/manage-classes.tsx on lines 72..78

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

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

            showError (err: any, message: any) {
              if (err.message) {
                window.alert(`${message}\n${err.message}`);
              } else {
                window.alert(message);
          rails/react-components/src/library/components/bookmarks/edit.tsx on lines 105..111
          rails/react-components/src/library/components/materials-collection/edit-list.tsx on lines 49..55

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

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

            showError (err: any, message: any) {
              if (err.message) {
                window.alert(`${message}\n${err.message}`);
              } else {
                window.alert(message);
          rails/react-components/src/library/components/materials-collection/edit-list.tsx on lines 49..55
          rails/react-components/src/library/components/portal-classes/manage-classes.tsx on lines 72..78

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

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

                  getValues: function() {
                      if( !this._values ) {
                          var tokens = this.tokens,
                              len = tokens.length,
                              Tokenizer = PIE.Tokenizer,
          Severity: Minor
          Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 1 hr to fix

            Function buildSelector has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              buildSelector: function() {
                this.selector = new Element('div').addClassName('selector').hide();
            
                this.mask = new Element('div').hide().addClassName('ui_calendar_mask').setOpacity(0.3);
            
            
            Severity: Minor
            Found in rails/public/javascripts/light_box.js - About 1 hr to fix

              Function tokenize has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function tokenize( selector, parseOnly ) {
                  var matched, match, tokens, type,
                    soFar, groups, preFilters,
                    cached = tokenCache[ selector + " " ];
              
              
              Severity: Minor
              Found in rails/app/assets/javascripts/prototype.js - About 1 hr to fix

                Function removeData has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    removeData: function( elem, name, pvt /* Internal Use Only */ ) {
                        if ( !jQuery.acceptData( elem ) ) {
                            return;
                        }
                
                
                Severity: Minor
                Found in rails/app/assets/javascripts/jquery/jquery.js - About 1 hr to fix

                  Function select has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function select( selector, context, results, seed, xml ) {
                      var i, tokens, token, type, find,
                          match = tokenize( selector ),
                          j = match.length;
                  
                  
                  Severity: Minor
                  Found in rails/app/assets/javascripts/jquery/jquery.js - About 1 hr to fix

                    Function buildSelector has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      buildSelector: function() {
                        this.selector = new Element('div').addClassName('selector').hide();
                    
                        this.mask = new Element('div').hide().addClassName('ui_calendar_mask').setOpacity(0.3);
                    
                    
                    Severity: Minor
                    Found in rails/app/assets/javascripts/prototype-ui/prototype-ui.js - About 1 hr to fix

                      Method portal_nces06_school_strong_params has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def portal_nces06_school_strong_params(params)
                          params && params.permit(:AM, :AM01F, :AM01M, :AM01U, :AM02F, :AM02M, :AM02U, :AM03F, :AM03M, :AM03U, :AM04F, :AM04M, :AM04U,
                                                  :AM05F, :AM05M, :AM05U, :AM06F, :AM06M, :AM06U, :AM07F, :AM07M, :AM07U, :AM08F, :AM08M, :AM08U, :AM09F,
                                                  :AM09M, :AM09U, :AM10F, :AM10M, :AM10U, :AM11F, :AM11M, :AM11U, :AM12F, :AM12M, :AM12U, :AMALF, :AMALM,
                                                  :AMALU, :AMKGF, :AMKGM, :AMKGU, :AMPKF, :AMPKM, :AMPKU, :AMUGF, :AMUGM, :AMUGU, :AS01F, :AS01M, :AS01U,
                      Severity: Minor
                      Found in rails/app/controllers/portal/nces06_schools_controller.rb - About 1 hr to fix

                        Function fillColumns has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            const fillColumns = (array: any, columnIdx?: any, visible?: any) => {
                              if (columnIdx == null) {
                                columnIdx = 0;
                              }
                              if (visible == null) {
                          Severity
                          Category
                          Status
                          Source
                          Language