concord-consortium/rigse

View on GitHub

Showing 2,136 of 2,138 total issues

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

  renderStandards () {
    const resource = this.state.resource;
    if (!resource.standard_statements || resource.standard_statements.length === 0) {
      return null;
    }
Severity: Minor
Found in rails/react-components/src/library/components/resource-lightbox.tsx - About 1 hr to fix

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

            "CHILD": function( type, argument, first, last ) {
    
                if ( type === "nth" ) {
                    return function( elem ) {
                        var node, diff,
    Severity: Minor
    Found in rails/app/assets/javascripts/jquery/jquery.js - About 1 hr to fix

      Method import_activity has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def import_activity(activity_json,import_object,imported_activity_url=nil)
          begin
            Timeout.timeout(90) {
              client = Client.where(:site_url => APP_CONFIG[:authoring_site_url]).first!
              auth_token = 'Bearer %s' % client.app_secret
      Severity: Minor
      Found in rails/app/models/import/import_external_activity.rb - About 1 hr to fix

        Method reset_password has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def reset_password
        
                login_or_email = params[:login_or_email]
        
                #
        Severity: Minor
        Found in rails/app/controllers/api/v1/passwords_controller.rb - About 1 hr to fix

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

            render () {
              const { anyClasses, offerings, anyData, anyStudents } = this.props;
              if (!anyClasses) {
                return (
                  <>

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

                if (!this.options.sync)
                  Effect.Queues.get(Object.isString(this.options.queue) ?
                    'global' : this.options.queue.scope).remove(this);
            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 268..270

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

            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

                            event.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );
            Severity: Major
            Found in rails/app/assets/javascripts/jquery/jquery.js and 1 other location - About 1 hr to fix
            rails/app/assets/javascripts/jquery/jquery.js on lines 3116..3116

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

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

              query (_params: any, _fieldName?: any) {
                const params = jQuery.extend({}, _params); // clone
                if (_fieldName) {
                  this.setState({ [`waitingFor_${_fieldName}`]: true });
                  params.load_only = _fieldName;

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

                onEndDrag: function(event) {
                  if (this.draggedWindow) {
                    event.stop();
                    this.dragOverlay.remove();
                    this.draggedWindow.endDrag();
              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 2780..2787
              rails/app/assets/javascripts/prototype-ui/prototype-ui.js on lines 4746..4753

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

              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 (!this.options.sync)
                    Effect.Queues.get(Object.isString(this.options.queue) ?
                      'global' : this.options.queue.scope).add(this);
              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 291..293

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

              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

                              event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
              Severity: Major
              Found in rails/app/assets/javascripts/jquery/jquery.js and 1 other location - About 1 hr to fix
              rails/app/assets/javascripts/jquery/jquery.js on lines 3117..3117

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

              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

                onEndDrag: function(event) {
                  if (this.draggedWindow) {
                    event.stop();
                    this.dragOverlay.remove();
                    this.draggedWindow.endDrag();
              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 4746..4753
              rails/public/javascripts/light_box.js on lines 4746..4753

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

              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

                onEndDrag: function(event) {
                  if (this.draggedWindow) {
                    event.stop();
                    this.dragOverlay.remove();
                    this.draggedWindow.endDrag();
              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 2780..2787
              rails/public/javascripts/light_box.js on lines 4746..4753

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

              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

                    if ( seed ) {
                      if ( postFinder || preFilter ) {
                        if ( postFinder ) {
                          temp = [];
                          i = matcherOut.length;
              Severity: Major
              Found in rails/app/assets/javascripts/prototype.js and 1 other location - About 1 hr to fix
              rails/app/assets/javascripts/jquery/jquery.js on lines 4888..4907

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

              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

                      if ( seed ) {
                          // Ignore postFinder because it can't coexist with seed
                          i = preFilter && matcherOut.length;
                          while ( i-- ) {
                              if ( (elem = matcherOut[i]) ) {
              Severity: Major
              Found in rails/app/assets/javascripts/jquery/jquery.js and 1 other location - About 1 hr to fix
              rails/app/assets/javascripts/prototype.js on lines 5948..5982

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

              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

                handleClose (e: any) {
                  if (e.target.className === css.portalPagesCollectionLightboxBackgroundClose ||
                      e.target.className === css.portalPagesCollectionLightbox) {
                    this.props.closeLightbox(e);
                  }
              rails/react-components/src/library/components/resource-finder-lightbox.tsx on lines 28..33

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

              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

                handleClose (e: any) {
                  if (e.target.className === css.portalPagesResourceFinderLightboxBackgroundClose ||
                      e.target.className === css.portalPagesResourceFinderLightbox) {
                    this.props.closeLightbox(e);
                  }
              rails/react-components/src/library/components/collection-lightbox.tsx on lines 43..48

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

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

                function matcherFromTokens( tokens ) {
                  var checkContext, matcher, j,
                    len = tokens.length,
                    leadingRelative = Expr.relative[ tokens[0].type ],
                    implicitRelative = leadingRelative || Expr.relative[" "],
              Severity: Minor
              Found in rails/app/assets/javascripts/prototype.js - About 1 hr to fix

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

                function addCombinator( matcher, combinator, base ) {
                    var dir = combinator.dir,
                        checkNonElements = base && combinator.dir === "parentNode",
                        doneName = done++;
                
                
                Severity: Minor
                Found in rails/app/assets/javascripts/jquery/jquery.js - About 1 hr to fix

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

                    function getPixelValue(value, property, context) {
                      var element = null;
                      if (Object.isElement(value)) {
                        element = value;
                        value = getRawStyle(element, property);
                  Severity: Minor
                  Found in rails/app/assets/javascripts/prototype.js - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language