concord-consortium/rigse

View on GitHub

Showing 2,136 of 2,138 total issues

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

    if((!this.options.constraint) || (this.options.constraint=='vertical'))
      style.top  = p[1] + "px";
Severity: Minor
Found in rails/app/assets/javascripts/dragdrop.js and 1 other location - About 40 mins to fix
rails/app/assets/javascripts/dragdrop.js on lines 490..491

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

                    if( repeat === 'repeat-y' || repeat === 'no-repeat' ) {
                        clipL = pxX + 1;
                        clipR = pxX + size.w + clipAdjust;
                    }
Severity: Minor
Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js and 1 other location - About 40 mins to fix
rails/app/assets/javascripts/pie/PIE_uncompressed.js on lines 2805..2808

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

Form.EventObserver = Class.create(Abstract.EventObserver, {
  getValue: function() {
    return Form.serialize(this.element);
  }
});
Severity: Minor
Found in rails/app/assets/javascripts/prototype.js and 1 other location - About 40 mins to fix
rails/app/assets/javascripts/prototype.js on lines 6626..6630

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

      if (this.is_multiple) {
        this.search_choices = this.container.down('ul.chosen-choices');
        this.search_container = this.container.down('li.search-field');
      } else {
Severity: Minor
Found in rails/app/assets/javascripts/chosen.proto.js and 1 other location - About 40 mins to fix
rails/app/assets/javascripts/chosen.proto.js on lines 630..633

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

Form.Observer = Class.create(Abstract.TimedObserver, {
  getValue: function() {
    return Form.serialize(this.element);
  }
});
Severity: Minor
Found in rails/app/assets/javascripts/prototype.js and 1 other location - About 40 mins to fix
rails/app/assets/javascripts/prototype.js on lines 6679..6683

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

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

        <span className={css.iconCell}><span className={`${css.sortIcon} icon-sort`} /></span>
rails/react-components/src/library/components/assigments/offering-row.tsx on lines 48..48
rails/react-components/src/library/components/bookmarks/bookmark-row.tsx on lines 62..62
rails/react-components/src/library/components/portal-classes/class-row.tsx on lines 13..13

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

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

        <span className={css.iconCell}><span className={`${css.sortIcon} icon-sort`} /></span>
rails/react-components/src/library/components/assigments/offering-row.tsx on lines 48..48
rails/react-components/src/library/components/bookmarks/bookmark-row.tsx on lines 62..62
rails/react-components/src/library/components/materials-collection/materials-collection-list-row.tsx on lines 15..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 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

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

          { !readOnly && <span className={css.iconCell}><span className={`${css.sortIcon} icon-sort`} /></span> }
rails/react-components/src/library/components/bookmarks/bookmark-row.tsx on lines 62..62
rails/react-components/src/library/components/materials-collection/materials-collection-list-row.tsx on lines 15..15
rails/react-components/src/library/components/portal-classes/class-row.tsx on lines 13..13

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

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

          <span className={css.iconCell}><span className={`${css.sortIcon} icon-sort`} /></span>
rails/react-components/src/library/components/assigments/offering-row.tsx on lines 48..48
rails/react-components/src/library/components/materials-collection/materials-collection-list-row.tsx on lines 15..15
rails/react-components/src/library/components/portal-classes/class-row.tsx on lines 13..13

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

    logout: (params: LoginParams) => {
      console.log("logout")
      console.dir(params)
      return Promise.resolve()
    },
Severity: Minor
Found in admin-panel/react-admin-interface/src/portalAuthProvider.ts and 1 other location - About 40 mins to fix
admin-panel/react-admin-interface/src/portalAuthProvider.ts on lines 79..83

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

    headerItems.push(
      <li key={nextKey("SecondButton")} className="portal-pages-main-nav-item">
        { this.renderSecondButton() }
      </li>
    );
Severity: Minor
Found in rails/react-components/src/library/components/page-header.tsx and 1 other location - About 40 mins to fix
rails/react-components/src/library/components/page-header.tsx on lines 188..192

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

    getPermissions: (params: GetPermissionsParams) => {
      console.log("getPermissions")
      console.dir(params)
      return Promise.resolve()
    }
Severity: Minor
Found in admin-panel/react-admin-interface/src/portalAuthProvider.ts and 1 other location - About 40 mins to fix
admin-panel/react-admin-interface/src/portalAuthProvider.ts on lines 56..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 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 2 locations. Consider refactoring.
Open

    headerItems.push(
      <li key={nextKey("FirstButton")} className="portal-pages-main-nav-item">
        { this.renderFirstButton() }
      </li>
    );
Severity: Minor
Found in rails/react-components/src/library/components/page-header.tsx and 1 other location - About 40 mins to fix
rails/react-components/src/library/components/page-header.tsx on lines 193..197

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

Consider simplifying this complex logical expression.
Open

    if ( support.matchesSelector && documentIsHTML &&
      ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
      ( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {

      try {
Severity: Major
Found in rails/app/assets/javascripts/prototype.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

        if (/\d/.test(value) && element && element.runtimeStyle && !(isPercentage && isViewport)) {
          var style = element.style.left, rStyle = element.runtimeStyle.left;
          element.runtimeStyle.left = element.currentStyle.left;
          element.style.left = value || 0;
          value = element.style.pixelLeft;
    Severity: Major
    Found in rails/app/assets/javascripts/prototype.js - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

                  if( borderProps.widthsSame && borderProps.stylesSame && borderProps.colorsSame ) {
                      if( colors.t.alpha() > 0 ) {
                          // shortcut for identical border on all sides - only need 1 stroked shape
                          wT = widths.t.pixels( el ); //thickness
                          wR = wT / 2; //shrink
      Severity: Major
      Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

                if ( (!submitBubbles && this.eventName == 'submit' && !isForm(this.element)) ||
                     (!changeBubbles && this.eventName == 'change' && !isInput(this.element)) ) {
                  // "submit" => "emulated:submit"
                  this.eventName = 'emulated:' + this.eventName
                }
        Severity: Major
        Found in rails/app/assets/javascripts/rails.js - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

                  if ( matcher[ expando ] ) {
                    j = ++i;
                    for ( ; j < len; j++ ) {
                      if ( Expr.relative[ tokens[j].type ] ) {
                        break;
          Severity: Major
          Found in rails/app/assets/javascripts/prototype.js - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

                  if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) ||
                    (classNames && classNames.all(function(name) {
                      return !name.toString().blank() && cn.include(' ' + name + ' ');
                    }))))
                    elements.push(Element.extend(child));
            Severity: Major
            Found in rails/app/assets/javascripts/prototype.js - About 40 mins to fix

              Consider simplifying this complex logical expression.
              Open

                      if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {
                          return;
                      }
              Severity: Major
              Found in rails/app/assets/javascripts/jquery/jquery.js - About 40 mins to fix
                Severity
                Category
                Status
                Source
                Language