SpontaneousCMS/spontaneous

View on GitHub

Showing 261 of 342 total issues

Function EditPanel has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
Open

Spontaneous.EditPanel = (function($, S) {
    var dom = S.Dom, Dialogue = Spontaneous.Dialogue;

    var EditPanel = new JS.Class(Dialogue, {
        initialize: function(parent_view) {
Severity: Minor
Found in application/js/edit_panel.js - About 1 day to fix

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 PageView has a Cognitive Complexity of 61 (exceeds 5 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;
Severity: Minor
Found in application/js/views/page_view.js - About 1 day to fix

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 EditPanel has 238 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Spontaneous.EditPanel = (function($, S) {
    var dom = S.Dom, Dialogue = Spontaneous.Dialogue;

    var EditPanel = new JS.Class(Dialogue, {
        initialize: function(parent_view) {
Severity: Major
Found in application/js/edit_panel.js - About 1 day to fix

    Function AddAliasDialogue has 232 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Spontaneous.AddAliasDialogue = (function($, S, window) {
        'use strict';
        var dom = S.Dom, Dialogue = Spontaneous.Dialogue;
    
        var Target = function(data, element) {
    Severity: Major
    Found in application/js/add_alias_dialogue.js - About 1 day to fix

      Function UploadManager has 230 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Spontaneous.UploadManager = (function($, S) {
          var dom = S.Dom;
          var Upload = S.Upload;
          var WrapUpload = new JS.Class(Upload, {
              start: function() {
      Severity: Major
      Found in application/js/upload_manager.js - About 1 day to fix

        Function Content has 230 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Spontaneous.Content = (function($, S) {
            'use strict';
            var dom = S.Dom;
        
            var Content = new JS.Class({
        Severity: Major
        Found in application/js/content.js - About 1 day to fix

          Function Image has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
          Open

          Spontaneous.Field.Image = (function($, S) {
              'use strict';
              var dom = S.Dom;
              var ImageFieldConflictView = new JS.Class(S.Field.String.ConflictView, {
          
          
          Severity: Minor
          Found in application/js/field/image.js - About 1 day to fix

          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 UploadManager has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
          Open

          Spontaneous.UploadManager = (function($, S) {
              var dom = S.Dom;
              var Upload = S.Upload;
              var WrapUpload = new JS.Class(Upload, {
                  start: function() {
          Severity: Minor
          Found in application/js/upload_manager.js - About 1 day to fix

          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 user_admin.js has 509 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          Spontaneous.MetaView.UserAdmin = (function($, S){
              var dom = S.Dom, ajax = S.Ajax;
          
              var Level = new JS.Class({
                  initialize: function(attributes) {
          Severity: Major
          Found in application/js/meta_view/user_admin.js - About 1 day to fix

            Function PieceView has 198 lines of code (exceeds 25 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, {
            Severity: Major
            Found in application/js/views/piece_view.js - About 7 hrs to fix

              Function Content has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
              Open

              Spontaneous.Content = (function($, S) {
                  'use strict';
                  var dom = S.Dom;
              
                  var Content = new JS.Class({
              Severity: Minor
              Found in application/js/content.js - About 7 hrs to fix

              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 Dialogue has 193 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              Spontaneous.Dialogue = (function($, S) {
                  var dom = S.Dom;
              
              
                  var Button = new JS.Class({
              Severity: Major
              Found in application/js/dialogue.js - About 7 hrs to fix

                Function String has 193 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                Spontaneous.Field.String = (function($, S) {
                    var dom = S.Dom;
                    var StringFieldConflictView = new JS.Class({
                        initialize: function(dialogue, conflict) {
                            this.dialogue = dialogue;
                Severity: Major
                Found in application/js/field/string.js - About 7 hrs to fix

                  Function ShardedUpload has 190 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  Spontaneous.ShardedUpload = (function($, S) {
                      var dom = S.Dom;
                      var upload_id = (new Date()).valueOf();
                      var Shard = new JS.Class({
                          initialize: function(uploader, index, blob) {
                  Severity: Major
                  Found in application/js/sharded_upload.js - About 7 hrs to fix

                    Function AddAliasDialogue has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
                    Open

                    Spontaneous.AddAliasDialogue = (function($, S, window) {
                        'use strict';
                        var dom = S.Dom, Dialogue = Spontaneous.Dialogue;
                    
                        var Target = function(data, element) {
                    Severity: Minor
                    Found in application/js/add_alias_dialogue.js - About 7 hrs to fix

                    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 Scope has 51 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                        class Scope
                    
                          def initialize(dataset, schema)
                            @dataset      = dataset
                            @schema       = schema
                    Severity: Major
                    Found in lib/spontaneous/data_mapper/scope.rb - About 7 hrs to fix

                      Function Location has 164 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      Spontaneous.Location = (function($, S) {
                          var ajax = S.Ajax;
                      
                          var State = new JS.Class({
                              initialize: function(path) {
                      Severity: Major
                      Found in application/js/location.js - About 6 hrs to fix

                        Class Format has 45 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                          class Format
                            module ClassMethods
                              # class_attribute :template_engine
                        
                              def inherited(subclass)
                        Severity: Minor
                        Found in lib/spontaneous/output/format.rb - About 6 hrs to fix

                          Class Schema has 45 methods (exceeds 20 allowed). Consider refactoring.
                          Open

                              class Schema
                                attr_accessor :schema_loader_class
                                attr_reader   :uids
                                attr_reader   :site
                          
                          
                          Severity: Minor
                          Found in lib/spontaneous/schema.rb - About 6 hrs to fix

                            Function Ajax has 150 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            Spontaneous.Ajax = (function($, S) {
                                'use strict';
                            
                                $.ajaxSetup({
                                    'async': true,
                            Severity: Major
                            Found in application/js/ajax.js - About 6 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language