concord-consortium/rigse

View on GitHub

Showing 2,136 of 2,138 total issues

Function each has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    each: function( obj, callback, args ) {
        var name,
            i = 0,
            length = obj.length,
            isObj = length === undefined || jQuery.isFunction( obj );
Severity: Minor
Found in rails/app/assets/javascripts/jquery/jquery.js - About 1 hr to fix

    Function attr has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        attr: function( elem, name, value, pass ) {
            var ret, hooks, notxml,
                nType = elem.nodeType;
    
            // don't get/set attributes on text, comment and attribute nodes
    Severity: Minor
    Found in rails/app/assets/javascripts/jquery/jquery.js - About 1 hr to fix

      Function cleanData has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          cleanData: function( elems, /* internal */ acceptData ) {
              var data, id, elem, type,
                  i = 0,
                  internalKey = jQuery.expando,
                  cache = jQuery.cache,
      Severity: Minor
      Found in rails/app/assets/javascripts/jquery/jquery.js - About 1 hr to fix

        Function showHide has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function showHide( elements, show ) {
            var elem, display,
                values = [],
                index = 0,
                length = elements.length;
        Severity: Minor
        Found in rails/app/assets/javascripts/jquery/jquery.js - About 1 hr to fix

          Function access has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
                  var exec,
                      bulk = key == null,
                      i = 0,
                      length = elems.length;
          Severity: Minor
          Found in rails/app/assets/javascripts/jquery/jquery.js - About 1 hr to fix

            Function addMethods has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function addMethods(methods) {
                if (arguments.length === 0) addFormMethods();
            
                if (arguments.length === 2) {
                  var tagName = methods;
            Severity: Minor
            Found in rails/app/assets/javascripts/prototype.js - About 1 hr to fix

              Function poll_to_update_student_data_percentages has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              window.poll_to_update_student_data_percentages = function(options) {
              
                // done if no poll url
                if (!options.poll_url) {
                  if (console) {

                Function confirm has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                Portal.confirm = function(opts) {
                    var callback   = (opts && opts.callback) || function() { console.log("complete");    };
                    var message    = (opts && opts.message)  || "Are you sure?";
                    var okText     = (opts && opts.okText)   || "OK";
                    var cancelText = (opts && opts.okText)   || "Cancel";
                Severity: Minor
                Found in rails/app/assets/javascripts/modal.js - About 1 hr to fix

                  Function drawCrosshair has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      drawCrosshair: function(pos) {
                          var octx = this.octx,
                              options = this.options,
                              plotOffset = this.plotOffset,
                              x = plotOffset.left+pos.relX+0.5,
                  Severity: Minor
                  Found in rails/app/assets/javascripts/flotr/flotr_out.js - About 1 hr to fix

                    Function drawCrosshair has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        drawCrosshair: function(pos) {
                            var octx = this.octx,
                                options = this.options,
                                plotOffset = this.plotOffset,
                                x = plotOffset.left+pos.relX+0.5,
                    Severity: Minor
                    Found in rails/app/assets/javascripts/flotr/flotr.js - About 1 hr to fix

                      Method fetch_available_filter_options has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def fetch_available_filter_options
                          results = self.engine.search(self.searchable_models) do |s|
                            s.facet :subject_areas
                            s.facet :sensors
                            s.facet :grade_levels do
                      Severity: Minor
                      Found in rails/app/models/search.rb - About 1 hr to fix

                        Function keyup_checker has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            AbstractChosen.prototype.keyup_checker = function(evt) {
                              var stroke, _ref;
                              stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
                              this.search_field_scale();
                              switch (stroke) {
                        Severity: Minor
                        Found in rails/app/assets/javascripts/chosen.proto.js - About 1 hr to fix

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

                            def up
                              [
                                "embeddable_data_collectors",
                                "embeddable_data_tables",
                                "embeddable_drawing_tools",
                          Severity: Minor
                          Found in rails/db/migrate/20180508205053_drop_embeddable_tables.rb - About 1 hr to fix

                            Function apiCall has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              apiCall (action: any, options: any) {
                                const teacherClassesBasePath = "/api/v1/teacher_classes";
                                const classesBasePath = "/api/v1/classes";
                                let { clazz, data, onSuccess } = options;
                            
                            

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

                                render () {
                                  const data = this.props.material;
                                  return (
                                    <div className="mb-material">
                                      <div className="mb-material-thumbnail">

                                Function handleResponse has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    const handleResponse = (data: any) => {
                                      let newState: any;
                                      queryCache[cacheKey] = data;
                                      const aggs = data.aggregations;
                                      if (fieldName) {

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

                                    render () {
                                      const materialProperties = this.props.materialProperties;
                                      const sensors = this.props.sensors;
                                      const requirementsOutput = materialProperties.indexOf("Requires download") > -1
                                        ? <p>This resource requires Java. You can download Java for free from <a href="http://java.com/" title="Get Java">java.com</a>.<br /><br />Using macOS 10.9 or newer? You&apos;ll also need to install our launcher app. <a href="http://static.concord.org/installers/cc_launcher_installer.dmg" title="Download the CCLauncher installer">Download the launcher installer</a>, open the .dmg file, and drag the CCLauncher app to your Applications folder. Then return to this page and launch the resource.</p>

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

                                      function getUniqueElementID(element) {
                                        if (element === window) return 0;
                                    
                                        if (typeof element._prototypeUID === 'undefined')
                                          element._prototypeUID = Element.Storage.UID++;
                                    Severity: Major
                                    Found in rails/app/assets/javascripts/prototype.js and 1 other location - About 1 hr to fix
                                    rails/app/assets/javascripts/prototype.js on lines 3221..3227

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

                                    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

                                          matchers = [ function( elem, context, xml ) {
                                            return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
                                                (checkContext = context).nodeType ?
                                                  matchContext( elem, context, xml ) :
                                                  matchAnyContext( elem, context, xml ) );
                                    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 4925..4930

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

                                    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

                                        initialize: function() {
                                            this.element = new Element('iframe',{
                                                style: 'position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);display:none',
                                                src: 'javascript:void(0);',
                                                frameborder: 0 
                                    Severity: Major
                                    Found in rails/app/assets/javascripts/livepipe/livepipe.js and 1 other location - About 1 hr to fix
                                    rails/app/assets/javascripts/livepipe/window.js on lines 666..673

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

                                    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