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 (!resource.is_official && (resource.publication_status === "published")) {
      return (
        <div className={`${css.metaTag} ${css.community}`}>
          Community
        </div>
rails/react-components/src/library/components/stem-finder-result.tsx on lines 142..148

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

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

    <SortableContainer
      items={offerings.map((offering: any) => offering.id)}
      renderDragPreview={renderDragPreview}
      onReorder={onOfferingsReorder}
    >
rails/react-components/src/library/components/bookmarks/sortable-bookmarks.tsx on lines 51..62
rails/react-components/src/library/components/materials-collection/sortable-materials-collection-list.tsx on lines 43..52
rails/react-components/src/library/components/portal-classes/sortable-classes.tsx on lines 49..59

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

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

    <SortableContainer
      items={bookmarks.map((bookmark: any) => bookmark.id)}
      renderDragPreview={renderDragPreview}
      onReorder={onSortEnd}
    >
rails/react-components/src/library/components/assigments/offerings-table.tsx on lines 63..76
rails/react-components/src/library/components/materials-collection/sortable-materials-collection-list.tsx on lines 43..52
rails/react-components/src/library/components/portal-classes/sortable-classes.tsx on lines 49..59

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

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

        <button onClick={this.handleClick} name="type" value="teacher">
          I am a <strong>Teacher</strong>
        </button>
rails/react-components/src/library/components/signup/user_type_selector.tsx on lines 43..45

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

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

      return <Collections collections={collections} numTotalCollections={numTotalCollections} searching={searching} showAllCollections={showAllCollections} enableShowAllCollections={this.handleShowAllCollections} />;
Severity: Minor
Found in rails/react-components/src/library/components/stem-finder.tsx and 1 other location - About 35 mins to fix
rails/react-components/src/library/components/signup/signup.tsx on lines 147..153

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

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

    <SortableContainer
      items={classes.map((clazz: any) => clazz.id)}
      renderDragPreview={renderDragPreview}
      onReorder={onSortEnd}
    >
rails/react-components/src/library/components/assigments/offerings-table.tsx on lines 63..76
rails/react-components/src/library/components/bookmarks/sortable-bookmarks.tsx on lines 51..62
rails/react-components/src/library/components/materials-collection/sortable-materials-collection-list.tsx on lines 43..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 46.

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 = <BasicDataForm
        anonymous={anonymous}
        userType={userType}
        signupText={signupText}
        oauthProviders={oauthProviders}
Severity: Minor
Found in rails/react-components/src/library/components/signup/signup.tsx and 1 other location - About 35 mins to fix
rails/react-components/src/library/components/stem-finder.tsx on lines 782..782

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

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

        <button onClick={this.handleClick} name="type" value="student">
          I am a <strong>Student</strong>
        </button>
rails/react-components/src/library/components/signup/user_type_selector.tsx on lines 40..42

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

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

Avoid too many return statements within this function.
Open

                    return newToken( Type.OPERATOR, firstChar );
Severity: Major
Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                            return failure();
    Severity: Major
    Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return newToken( Type.CHARACTER, firstChar );
      Severity: Major
      Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                        return newToken( Type.IDENT, val );
        Severity: Major
        Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                                  return newToken( Type.URL, match[2] || match[3] || match[4] || '' );
          Severity: Major
          Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                                return newToken( Type.PERCENT, val + '%' );
            Severity: Major
            Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                                  return newToken( this.unitTypes[ match[0].toLowerCase() ] || Type.DIMEN, val );
              Severity: Major
              Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                    return newToken( Type.COLOR, val );
                Severity: Major
                Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                  return newToken( Type.NUMBER, val );
                  Severity: Major
                  Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                                return newToken( Type.COLOR, this.css.substring( ch, this.ch ) );
                    Severity: Major
                    Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                          return newToken( Type.FUNCTION, val );
                      Severity: Major
                      Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                            return 0;
                        Severity: Major
                        Found in rails/app/assets/javascripts/prototype.js - About 30 mins to fix
                          Severity
                          Category
                          Status
                          Source
                          Language