Showing 261 of 342 total issues
Function Markdown
has a Cognitive Complexity of 171 (exceeds 5 allowed). Consider refactoring. Open
Spontaneous.Field.Markdown = (function($, S) {
var dom = S.Dom;
var TextCommand = new JS.Class({
name: '',
pre: '',
- 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 Markdown
has 646 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spontaneous.Field.Markdown = (function($, S) {
var dom = S.Dom;
var TextCommand = new JS.Class({
name: '',
pre: '',
Function TopBar
has 606 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spontaneous.TopBar = (function($, S) {
var dom = S.Dom, Ajax = S.Ajax;
var disableParent = function(el) {
el.hover(function() {
Function TopBar
has a Cognitive Complexity of 130 (exceeds 5 allowed). Consider refactoring. Open
Spontaneous.TopBar = (function($, S) {
var dom = S.Dom, Ajax = S.Ajax;
var disableParent = function(el) {
el.hover(function() {
- 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 UserAdmin
has 507 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spontaneous.MetaView.UserAdmin = (function($, S){
var dom = S.Dom, ajax = S.Ajax;
var Level = new JS.Class({
initialize: function(attributes) {
Function PageView
has 413 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spontaneous.Views.PageView = (function($, S, document) {
var dom = S.Dom, user = S.User, ajax = S.Ajax, Types = S.Types;
var FunctionBar = function(page) {
this.page = page;
Function Publishing
has 408 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spontaneous.Publishing = (function($, S) {
var dom = S.Dom, Dialogue = Spontaneous.Dialogue, User = S.User;
var PublishingDialogue = new JS.Class(Dialogue, {
initialize: function(content) {
Method smarten
has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring. Open
def smarten(string, options=[2])
do_quotes = do_backticks = do_dashes = do_ellipses = do_stupify = nil
convert_quotes = false
if options.include? 0
- 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 Image
has 350 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spontaneous.Field.Image = (function($, S) {
'use strict';
var dom = S.Dom;
var ImageFieldConflictView = new JS.Class(S.Field.String.ConflictView, {
Class Box
has 91 methods (exceeds 20 allowed). Consider refactoring. Open
class Box
include Enumerable
include Spontaneous::Model::Core::SchemaHierarchy
include Spontaneous::Model::Core::Fields
Function BoxView
has 344 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spontaneous.Views.BoxView = (function($, S) {
'use strict';
var dom = S.Dom;
var BoxView = new JS.Class(Spontaneous.Views.View, {
Function BoxView
has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring. Open
Spontaneous.Views.BoxView = (function($, S) {
'use strict';
var dom = S.Dom;
var BoxView = new JS.Class(Spontaneous.Views.View, {
- 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 Publishing
has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring. Open
Spontaneous.Publishing = (function($, S) {
var dom = S.Dom, Dialogue = Spontaneous.Dialogue, User = S.User;
var PublishingDialogue = new JS.Class(Dialogue, {
initialize: function(content) {
- 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
Class Base
has 82 methods (exceeds 20 allowed). Consider refactoring. Open
class Base
module ClassMethods
def has_editor(js_class = ui_class)
define_singleton_method(:editor_class) { js_class }
end
Function Progress
has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring. 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
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
File markdown.js
has 648 lines of code (exceeds 250 allowed). Consider refactoring. Open
// console.log('Loading DiscountField...')
Spontaneous.Field.Markdown = (function($, S) {
var dom = S.Dom;
var TextCommand = new JS.Class({
Function Progress
has 287 lines of code (exceeds 25 allowed). Consider refactoring. 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 top_bar.js
has 608 lines of code (exceeds 250 allowed). Consider refactoring. Open
// console.log("Loading TopBar...")
Spontaneous.TopBar = (function($, S) {
var dom = S.Dom, Ajax = S.Ajax;
Function File
has 258 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spontaneous.Field.File = (function($, S) {
var dom = S.Dom;
var FileField = new JS.Class(Spontaneous.Field.String, {
selected_files: false,