concord-consortium/rigse

View on GitHub

Showing 2,136 of 2,138 total issues

Function drawGrid has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    drawGrid: function(){
        var v, o = this.options,
            ctx = this.ctx;
        if(o.grid.verticalLines || o.grid.horizontalLines){
            this.el.fire('flotr:beforegrid', [this.axes.x, this.axes.y, o, this]);
Severity: Minor
Found in rails/app/assets/javascripts/flotr/flotr_out.js - About 1 hr to fix

    Function findDataRanges has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        findDataRanges: function(){
            var s = this.series, 
                a = this.axes;
            
            a.x.datamin  = a.x.datamax = 
    Severity: Minor
    Found in rails/app/assets/javascripts/flotr/flotr_out.js - About 1 hr to fix

      Function findDataRanges has 43 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          findDataRanges: function(){
              var s = this.series, 
                  a = this.axes;
              
              a.x.datamin  = a.x.datamax = 
      Severity: Minor
      Found in rails/app/assets/javascripts/flotr/flotr.js - About 1 hr to fix

        Function drawGrid has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            drawGrid: function(){
                var v, o = this.options,
                    ctx = this.ctx;
                if(o.grid.verticalLines || o.grid.horizontalLines){
                    this.el.fire('flotr:beforegrid', [this.axes.x, this.axes.y, o, this]);
        Severity: Minor
        Found in rails/app/assets/javascripts/flotr/flotr.js - About 1 hr to fix

          Method initialize has 43 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def initialize(opts={})
          
              #
              # If this is not a subclass, use the default models.
              #
          Severity: Minor
          Found in rails/app/models/search.rb - About 1 hr to fix

            Method generic_oauth has 43 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def generic_oauth
            
                omniauth    = request.env["omniauth.auth"]
                origin      = request.env["omniauth.origin"]
            
            
            Severity: Minor
            Found in rails/app/controllers/authentications_controller.rb - About 1 hr to fix

              Method up has 43 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def self.up
                  create_table :bj_config, :primary_key => "bj_config_id", :force => true do |t|
                    t.text :hostname
                    t.text :key
                    t.text :value
              Severity: Minor
              Found in rails/db/migrate/20100212154213_bj_migration0.rb - About 1 hr to fix

                Method down has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  def self.down
                    create_table :bj_config, :primary_key => "bj_config_id", :force => true do |t|
                      t.text :hostname
                      t.text :key
                      t.text :value
                Severity: Minor
                Found in rails/db/migrate/20110920032143_remove_bj.rb - About 1 hr to fix

                  Method add_default_user has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    def self.add_default_user(user_info)
                  
                      default_password = APP_CONFIG[:password_for_default_users]
                      user = nil
                      user_by_email = nil
                  Severity: Minor
                  Found in rails/lib/mock_data/create_default_data.rb - About 1 hr to fix

                    Method arg_block has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      def arg_block(learners)
                        authoring_sites = learners.select { |l| l.runnable_type == "ExternalActivity" }.map do |learner|
                          uri = URI(learner.runnable.url)
                          "#{uri.scheme}://#{uri.host}:#{uri.port}"
                        end
                    Severity: Minor
                    Found in rails/app/controllers/report/learner_controller.rb - About 1 hr to fix

                      Method create_default_study_materials has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def self.create_default_study_materials
                          default_external_activities = []
                          @default_external_activities = default_external_activities
                      
                          # External Activity
                      Severity: Minor
                      Found in rails/lib/mock_data/create_default_data.rb - About 1 hr to fix

                        Function handleButton has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          handleButton (e: any) {
                            const { statement, material, afterChange, skipModal } = this.props;
                            let apiUrl: any = null;
                            let add = false;
                        
                        

                          Function renderInput has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            renderInput (name: any, titleOverride?: any) {
                              if (!this.state.filterables[name]) { return; }
                          
                              const hits = this.state.filterables[name];
                          
                          

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

                                        if( outsets && outsets[0] ) {
                                            p.outset = distributeSides( outsets, function( tok ) {
                                                return tok.isLength() ? PIE.getLength( tok.tokenValue ) : tok.tokenValue;
                                            } );
                                        }
                            Severity: Major
                            Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js and 1 other location - About 1 hr to fix
                            rails/app/assets/javascripts/pie/PIE_uncompressed.js on lines 2046..2050

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

                            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( widths && widths[0] ) {
                                            p.widths = distributeSides( widths, function( tok ) {
                                                return tok.isLengthOrPercent() ? PIE.getLength( tok.tokenValue ) : tok.tokenValue;
                                            } );
                                        }
                            Severity: Major
                            Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js and 1 other location - About 1 hr to fix
                            rails/app/assets/javascripts/pie/PIE_uncompressed.js on lines 2052..2056

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

                            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

                              FormSerializer.serializeJSON = function serializeJSON() {
                                if (this.length > 1) {
                                  return new Error("jquery-serialize-object can only serialize one form at a time");
                                }
                                return new FormSerializer($).
                            Severity: Major
                            Found in rails/app/assets/javascripts/jquery.serialize-object.js and 1 other location - About 1 hr to fix
                            rails/app/assets/javascripts/jquery.serialize-object.js on lines 117..124

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

                            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

                              FormSerializer.serializeObject = function serializeObject() {
                                if (this.length > 1) {
                                  return new Error("jquery-serialize-object can only serialize one form at a time");
                                }
                                return new FormSerializer($).
                            Severity: Major
                            Found in rails/app/assets/javascripts/jquery.serialize-object.js and 1 other location - About 1 hr to fix
                            rails/app/assets/javascripts/jquery.serialize-object.js on lines 126..133

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

                            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

                              const handleCreateFormSave = async (newFormData: IPermissionFormFormData) => {
                                const newForm = await createNewPermissionForm(newFormData);
                                if (newForm) {
                                  setCurrentSelectedProject(newForm.project_id as CurrentSelectedProject);
                                  setShowCreateNewFormModal(false);
                            rails/react-components/src/library/components/permission-forms/manage-forms-tab/manage-forms-tab.tsx on lines 72..79

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

                            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

                              @Authorized()
                              @Query(() => listMeta)
                              async _allUsersMeta(@Args() searchParams:UserPaginationAndFilter){
                                const count = await fuzzyCount<User>(User, 'user', searchParams);
                                return {count}
                            Severity: Major
                            Found in admin-panel/graphql-backend/src/resolvers/UserResolver.ts and 3 other locations - About 1 hr to fix
                            admin-panel/graphql-backend/src/resolvers/AdminProjectResolver.ts on lines 60..65
                            admin-panel/graphql-backend/src/resolvers/PortalPermissionFormResolver.ts on lines 51..56
                            admin-panel/graphql-backend/src/resolvers/PortalStudentResolver.ts on lines 52..57

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

                            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

                              @Authorized()
                              @Query(() => listMeta)
                              async _allAdminProjectsMeta(@Args() searchParams:ProjectSearch){
                                const count = await fuzzyCount<AdminProject>(AdminProject, 'adminProject', searchParams);
                                return {count}
                            admin-panel/graphql-backend/src/resolvers/PortalPermissionFormResolver.ts on lines 51..56
                            admin-panel/graphql-backend/src/resolvers/PortalStudentResolver.ts on lines 52..57
                            admin-panel/graphql-backend/src/resolvers/UserResolver.ts on lines 69..74

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

                            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