concord-consortium/rigse

View on GitHub

Showing 2,136 of 2,138 total issues

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

(function(p) {
  var b = p.Browser, n = navigator;

  if (b.WebKit) {
    b.WebKitVersion = parseFloat(n.userAgent.match(/AppleWebKit\/([\d\.\+]*)/)[1]);
Severity: Major
Found in rails/public/javascripts/light_box.js and 1 other location - About 1 day to fix
rails/app/assets/javascripts/prototype-ui/prototype-ui.js on lines 11..27

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

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

(function(p) {
  var b = p.Browser, n = navigator;

  if (b.WebKit) {
    b.WebKitVersion = parseFloat(n.userAgent.match(/AppleWebKit\/([\d\.\+]*)/)[1]);
Severity: Major
Found in rails/app/assets/javascripts/prototype-ui/prototype-ui.js and 1 other location - About 1 day to fix
rails/public/javascripts/light_box.js on lines 11..27

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

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

function preview_home_page(homePageContentId, homePageContent){
    var previewContent = null;

    if(homePageContentId){
        previewContent = $(homePageContentId).value;
Severity: Major
Found in rails/app/assets/javascripts/preview_home_page.js and 1 other location - About 1 day to fix
rails/app/assets/javascripts/preview_about_page.js on lines 1..46

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

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

    ajax: function( url, options ) {

        // If url is an object, simulate pre-1.5 signature
        if ( typeof url === "object" ) {
            options = url;
Severity: Major
Found in rails/app/assets/javascripts/jquery/jquery.js - About 1 day to fix

    File create_default_data.rb has 556 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    module MockData
    
      current_dir = File.dirname(__FILE__)
      default_data = {}
    
    
    Severity: Major
    Found in rails/lib/mock_data/create_default_data.rb - About 1 day to fix

      Function NgssHelper has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
      Open

      const NgssHelper = function () {
        const PE = "Performance Expectations";
        const DCI = "Disciplinary Core Ideas";
        const PRACTICES = "Science and Engineering Practices";
        const CONCEPTS = "Crosscutting Concepts";
      Severity: Minor
      Found in rails/react-components/src/library/helpers/standards-helpers.tsx - About 1 day to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

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

        morph: function(bounds, innerSize) {
          bounds = Object.extend(this.getBounds(innerSize), bounds || {});
      
          if (this.centerOptions && this.centerOptions.auto)
             bounds = Object.extend(bounds, this.computeRecenter(bounds));
      Severity: Major
      Found in rails/app/assets/javascripts/prototype-ui/prototype-ui.js and 2 other locations - About 1 day to fix
      rails/app/assets/javascripts/livepipe/window.js on lines 1948..1969
      rails/public/javascripts/light_box.js on lines 3705..3726

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

      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

        morph: function(bounds, innerSize) {
          bounds = Object.extend(this.getBounds(innerSize), bounds || {});
      
          if (this.centerOptions && this.centerOptions.auto)
             bounds = Object.extend(bounds, this.computeRecenter(bounds));
      Severity: Major
      Found in rails/app/assets/javascripts/livepipe/window.js and 2 other locations - About 1 day to fix
      rails/app/assets/javascripts/prototype-ui/prototype-ui.js on lines 3705..3726
      rails/public/javascripts/light_box.js on lines 3705..3726

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

      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

        morph: function(bounds, innerSize) {
          bounds = Object.extend(this.getBounds(innerSize), bounds || {});
      
          if (this.centerOptions && this.centerOptions.auto)
             bounds = Object.extend(bounds, this.computeRecenter(bounds));
      Severity: Major
      Found in rails/public/javascripts/light_box.js and 2 other locations - About 1 day to fix
      rails/app/assets/javascripts/livepipe/window.js on lines 1948..1969
      rails/app/assets/javascripts/prototype-ui/prototype-ui.js on lines 3705..3726

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

      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

        maximize: function() {
          if (this.maximized) return this;
      
          // Get bounds has to be before  this.windowManager.maximize for IE!! this.windowManager.maximize remove overflow
          // and it breaks this.getBounds()
      Severity: Major
      Found in rails/app/assets/javascripts/prototype-ui/prototype-ui.js and 2 other locations - About 1 day to fix
      rails/app/assets/javascripts/livepipe/window.js on lines 1625..1642
      rails/public/javascripts/light_box.js on lines 3373..3390

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

      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

        maximize: function() {
          if (this.maximized) return this;
      
          // Get bounds has to be before  this.windowManager.maximize for IE!! this.windowManager.maximize remove overflow
          // and it breaks this.getBounds()
      Severity: Major
      Found in rails/public/javascripts/light_box.js and 2 other locations - About 1 day to fix
      rails/app/assets/javascripts/livepipe/window.js on lines 1625..1642
      rails/app/assets/javascripts/prototype-ui/prototype-ui.js on lines 3373..3390

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

      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

        maximize: function() {
          if (this.maximized) return this;
      
          // Get bounds has to be before  this.windowManager.maximize for IE!! this.windowManager.maximize remove overflow
          // and it breaks this.getBounds()
      Severity: Major
      Found in rails/app/assets/javascripts/livepipe/window.js and 2 other locations - About 1 day to fix
      rails/app/assets/javascripts/prototype-ui/prototype-ui.js on lines 3373..3390
      rails/public/javascripts/light_box.js on lines 3373..3390

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

      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

        options: {
      
          // Property: theme
          //   window theme, uses the window manager theme as default
          theme:         null,
      Severity: Major
      Found in rails/app/assets/javascripts/livepipe/window.js and 2 other locations - About 1 day to fix
      rails/app/assets/javascripts/prototype-ui/prototype-ui.js on lines 2947..3031
      rails/public/javascripts/light_box.js on lines 2947..3031

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

      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

        setSize: function(width, height, innerSize) {
          var size = this.computeSize(width, height, innerSize);
          var elementStyle = this.element.style, contentStyle = this.content.style;
      
          this.options.width  = size.outerWidth;
      Severity: Major
      Found in rails/app/assets/javascripts/livepipe/window.js and 2 other locations - About 1 day to fix
      rails/app/assets/javascripts/prototype-ui/prototype-ui.js on lines 3660..3673
      rails/public/javascripts/light_box.js on lines 3660..3673

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

      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

        options: {
      
          // Property: theme
          //   window theme, uses the window manager theme as default
          theme:         null,
      Severity: Major
      Found in rails/app/assets/javascripts/prototype-ui/prototype-ui.js and 2 other locations - About 1 day to fix
      rails/app/assets/javascripts/livepipe/window.js on lines 1199..1283
      rails/public/javascripts/light_box.js on lines 2947..3031

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

      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

        setSize: function(width, height, innerSize) {
          var size = this.computeSize(width, height, innerSize);
          var elementStyle = this.element.style, contentStyle = this.content.style;
      
          this.options.width  = size.outerWidth;
      Severity: Major
      Found in rails/app/assets/javascripts/prototype-ui/prototype-ui.js and 2 other locations - About 1 day to fix
      rails/app/assets/javascripts/livepipe/window.js on lines 1903..1916
      rails/public/javascripts/light_box.js on lines 3660..3673

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

      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

        options: {
      
          // Property: theme
          //   window theme, uses the window manager theme as default
          theme:         null,
      Severity: Major
      Found in rails/public/javascripts/light_box.js and 2 other locations - About 1 day to fix
      rails/app/assets/javascripts/livepipe/window.js on lines 1199..1283
      rails/app/assets/javascripts/prototype-ui/prototype-ui.js on lines 2947..3031

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

      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

        setSize: function(width, height, innerSize) {
          var size = this.computeSize(width, height, innerSize);
          var elementStyle = this.element.style, contentStyle = this.content.style;
      
          this.options.width  = size.outerWidth;
      Severity: Major
      Found in rails/public/javascripts/light_box.js and 2 other locations - About 1 day to fix
      rails/app/assets/javascripts/livepipe/window.js on lines 1903..1916
      rails/app/assets/javascripts/prototype-ui/prototype-ui.js on lines 3660..3673

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

      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 hit has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
      Open

          hit: function(mouse){
              var series = this.series,
                  options = this.options,
                  prevHit = this.prevHit,
                  plotOffset = this.plotOffset,
      Severity: Minor
      Found in rails/app/assets/javascripts/flotr/flotr_out.js - About 1 day to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function hit has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
      Open

          hit: function(mouse){
              var series = this.series,
                  options = this.options,
                  prevHit = this.prevHit,
                  plotOffset = this.plotOffset,
      Severity: Minor
      Found in rails/app/assets/javascripts/flotr/flotr.js - About 1 day to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Severity
      Category
      Status
      Source
      Language