Showing 290 of 682 total issues
Avoid too many return
statements within this function. Open
return {seriesIndex: i, pointIndex:j, gridData:p, data:s.data[j]};
Avoid too many return
statements within this function. Open
return '';
Avoid too many return
statements within this function. Open
return justified;
Avoid too many return
statements within this function. Open
return {seriesIndex: i, pointIndex:j, gridData:p, data:s.data[j]};
Avoid too many return
statements within this function. Open
return {seriesIndex:s.index, pointIndex:j, gridData:null, data:s.data[j]};
Avoid too many return
statements within this function. Open
return {seriesIndex: i, pointIndex:j, gridData:p, data:s.data[j]};
Avoid too many return
statements within this function. Open
return {seriesIndex: i, pointIndex:j, gridData:p, data:s.data[j]};
Function toggle_expandable_link
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function toggle_expandable_link() {
expansionTime = 30; // ms
jQuery(this).toggleClass('collapsed-link');
jQuery(this.id.replace('expand', '#expandable'))
.toggle('blind', {}, expansionTime);
- Read upRead up
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
Method disallow_uninstalled_plugins
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def disallow_uninstalled_plugins
caller.each do |call_source|
if call_source =~ %r{/vendor/plugins/([^/]+)/}
plugin_name = $1
return unless installed_plugins.include? plugin_name
- Read upRead up
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
Method read
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.read
normal_file = "config/settings.yml"
sample_file = "config/settings.yml.example"
rails_root = Rails.root rescue File.dirname(File.dirname(__FILE__))
- Read upRead up
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"