application/js/progress.js
Function Progress
has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring. Open
Open
Spontaneous.Progress = (function($, S) {
var Progress = function(parent, size, options) {
var defaults = {
spinner_fg_color: '#000000', // colour
spinner_bg_color: null, // null or false for transparent
- 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 Progress
has 290 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Spontaneous.Progress = (function($, S) {
var Progress = function(parent, size, options) {
var defaults = {
spinner_fg_color: '#000000', // colour
spinner_bg_color: null, // null or false for transparent
Function Progress
has 287 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Progress = function(parent, size, options) {
var defaults = {
spinner_fg_color: '#000000', // colour
spinner_bg_color: null, // null or false for transparent
progress_fg_color: '#000000', // colour
File progress.js
has 292 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// console.log('Loading Progress...');
Spontaneous.Progress = (function($, S) {
var Progress = function(parent, size, options) {
var defaults = {
Function update
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
update: function(percent) {
this._indeterminate = false;
percent = Math.max(0.1, parseFloat(percent)); // always show something...
this._percent = percent;
Function _draw_rounded
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
_draw_rounded: function(ctx, c, r1, r2, a, p) {
Function _draw_square
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
_draw_square: function(ctx, c, r1, r2, a, p) {