Showing 9 of 21 total issues
Function animatedModal
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.animatedModal = function(action, options) {
var modal = $(this);
if (action && typeof(action) === 'object') {
options = action;
Function triggerAnimatedModal
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.triggerAnimatedModal = function(options) {
var modal = $(this);
//Defaults
var settings = $.extend({
Function attachHeaderListener
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
HttpHeaders.prototype.attachHeaderListener = function($headersTable, $addHeaderBtn) {
var storeName = this.prefix + 'saved';
$headersTable.on('keyup', '[contenteditable]', function() {
var $this = $(this);
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(name, comments, methods, params, controller)
Method build_parser_leaf_node
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def build_parser_leaf_node(parent, source)
case parent
when String
parent << "\n" if parent.length != 0
parent << source.try(:strip) || ''
- 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 deflated_url_params
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def deflated_url_params(params, wrapper = nil)
new_params = {}
params.each do |attribute, type|
new_attribute = wrapper ? "#{wrapper}[#{attribute}]" : attribute
- 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
Function storage
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
storage: function() {
if (!this.storageAdapter) {
if (this.localStorageAvailable()) {
this.storageAdapter = localStorage;
} else {
- 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 build_parser_default_node
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def build_parser_default_node(parent, words)
key = words.first
keyword = key.upcase
return unless words.count == 1
- 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
Function set
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
set: function(key, value) {
if (!key || !value) return;
var store = this.storage();
- 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"