Showing 261 of 342 total issues
File page_view.js
has 415 lines of code (exceeds 250 allowed). Consider refactoring. Open
// console.log('Loading Page...')
Spontaneous.Views.PageView = (function($, S, document) {
var dom = S.Dom, user = S.User, ajax = S.Ajax, Types = S.Types;
File publish.js
has 410 lines of code (exceeds 250 allowed). Consider refactoring. Open
// console.log('Loading Publishing...')
Spontaneous.Publishing = (function($, S) {
var dom = S.Dom, Dialogue = Spontaneous.Dialogue, User = S.User;
Class Dataset
has 43 methods (exceeds 20 allowed). Consider refactoring. Open
class Dataset
include Enumerable
def initialize(dataset, schema, identity_map)
@dataset, @schema, @identity_map = dataset, schema, identity_map
Class Revision
has 43 methods (exceeds 20 allowed). Consider refactoring. Open
class Revision
class InvalidRevision < Spontaneous::Error; end
class Generator
attr_reader :modified_pages
Function PieceView
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
Spontaneous.Views.PieceView = (function($, S) {
var dom = S.Dom, user = S.User;
var debug = 0;
var ConfirmDeletePopup = new JS.Class(Spontaneous.PopoverView, {
- 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 Properties
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
Spontaneous.Properties = (function($, S) {
var Properties = new JS.Module({
_props_debug: false,
_props_properties: function() {
if (!this._props_property_store) { this._props_property_store = {}; }
- 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 Views
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spontaneous.Views = (function($, S) {
var dom = S.Dom;
var View = new JS.Class({
include: Spontaneous.Properties,
initialize: function(content) {
Function PageBrowser
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spontaneous.PageBrowser = (function($, S) {
var dom = S.Dom
, flattenPageList = function(pageList) {
var pages = []
, comparator = function(a, b) {
Function File
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
Spontaneous.Field.File = (function($, S) {
var dom = S.Dom;
var FileField = new JS.Class(Spontaneous.Field.String, {
selected_files: false,
- 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 Location
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
Spontaneous.Location = (function($, S) {
var ajax = S.Ajax;
var State = new JS.Class({
initialize: function(path) {
- 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 Box
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spontaneous.Box = (function($, S) {
var dom = S.Dom;
var Box = new JS.Class(Spontaneous.Content, {
Function Ajax
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
Spontaneous.Ajax = (function($, S) {
'use strict';
$.ajaxSetup({
'async': true,
- 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 sync_to_revision
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def sync_to_revision(revision, origin=false)
# 'publish' is a lock to make sure the duplication doesn't cross
# page boundaries unless that's necessary (such as in the case
# of a page addition)
publish = origin || !page?
- 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
File box.rb
has 373 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Spontaneous
class Box
include Enumerable
include Spontaneous::Model::Core::SchemaHierarchy
File base.rb
has 370 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Spontaneous
module Field
class Base
module ClassMethods
def has_editor(js_class = ui_class)
Class Fog
has 37 methods (exceeds 20 allowed). Consider refactoring. Open
class Fog < Backend
def initialize(config)
@config = config
end
Function ContentArea
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spontaneous.ContentArea = (function($, S) {
var dom = S.Dom;
var ContentArea = new JS.Singleton({
include: Spontaneous.Properties,
Function edit
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
edit: function() {
var wrap = dom.div(),
drop_wrap = dom.div({'style':'position:relative;'}),
value = this.currentEditValue(),
src = value.src,
File image.js
has 353 lines of code (exceeds 250 allowed). Consider refactoring. Open
// console.log('Loading ImageField...')
Spontaneous.Field.Image = (function($, S) {
'use strict';
var dom = S.Dom;
var ImageFieldConflictView = new JS.Class(S.Field.String.ConflictView, {
Class BoxPrototype
has 34 methods (exceeds 20 allowed). Consider refactoring. Open
class BoxPrototype
attr_reader :name, :options, :owner
def initialize(owner, name, options, blocks = [], &block)