themouette/fossil-core

View on GitHub

Showing 86 of 86 total issues

Function viewStore has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var viewStore = function (_, utils, Mixin) {
        var ViewStore = Mixin.extend({
                factories: null,
                views: null,
                constructor: function () {
Severity: Major
Found in samples/fossil-core.js - About 2 hrs to fix

    Function makeModuleMap has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {
                var url, pluginModule, suffix, nameParts,
                    prefix = null,
                    parentName = parentModuleMap ? parentModuleMap.name : null,
                    originalName = name,
    Severity: Minor
    Found in samples/todo/app.js - About 2 hrs to fix

      Function observableBuffer has 49 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var observableBuffer = function (Mixin) {
              var ObservableBuffer = Mixin.extend({
                      constructor: function () {
                          this.store = [];
                          Mixin.apply(this, arguments);
      Severity: Minor
      Found in fossil-core.js - About 1 hr to fix

        Function observableBuffer has 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var observableBuffer = function (Mixin) {
                var ObservableBuffer = Mixin.extend({
                        constructor: function () {
                            this.store = [];
                            Mixin.apply(this, arguments);
        Severity: Minor
        Found in samples/fossil-core.js - About 1 hr to fix

          Function mixins_startable has 49 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var mixins_startable = function () {
                  
                  var Startable = {
                          run: false,
                          start: function () {
          Severity: Minor
          Found in samples/fossil-core.js - About 1 hr to fix

            Function mixins_startable has 49 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var mixins_startable = function () {
                    
                    var Startable = {
                            run: false,
                            start: function () {
            Severity: Minor
            Found in fossil-core.js - About 1 hr to fix

              Function exports has 48 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              module.exports = function(grunt) {
                  var port = grunt.option('port') || 1337;
              
                  // Project configuration.
                  grunt.initConfig({
              Severity: Minor
              Found in skeleton/Gruntfile.js - About 1 hr to fix

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            _.each(events, function (method, eventid) {
                                // create callback from method
                                // if it is not a function already, it should be a method
                                if (!_.isFunction(method)) {
                                    method = observer[method];
                Severity: Major
                Found in src/mixins/observable.js and 1 other location - About 1 hr to fix
                src/mixins/observable.js on lines 33..40

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 72.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            _.each(events, function (method, eventid) {
                                // create callback from method
                                // if it is not a function already, it should be a method
                                if (!_.isFunction(method)) {
                                    method = observable[method];
                Severity: Major
                Found in src/mixins/observable.js and 1 other location - About 1 hr to fix
                src/mixins/observable.js on lines 68..75

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 72.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Function services_template has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var services_template = function (_, utils, Service) {
                        var Template = Service.extend({
                                engine: null,
                                useDeep: true,
                                constructor: function (options) {
                Severity: Minor
                Found in fossil-core.js - About 1 hr to fix

                  Function services_template has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var services_template = function (_, utils, Service) {
                          var Template = Service.extend({
                                  engine: null,
                                  useDeep: true,
                                  constructor: function (options) {
                  Severity: Minor
                  Found in samples/fossil-core.js - About 1 hr to fix

                    Function engines_underscore has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var engines_underscore = function (_, Backbone, Mixin, Observable, Deferrable, Startable) {
                            var ViewExtension = {
                                    precompile: function (template) {
                                        if (typeof template === 'string') {
                                            return _.template(template);
                    Severity: Minor
                    Found in samples/fossil-core.js - About 1 hr to fix

                      Function engines_underscore has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      var engines_underscore = function (_, Backbone, Mixin, Observable, Deferrable, Startable) {
                              var ViewExtension = {
                                      precompile: function (template) {
                                          if (typeof template === 'string') {
                                              return _.template(template);
                      Severity: Minor
                      Found in fossil-core.js - About 1 hr to fix

                        Similar blocks of code found in 4 locations. Consider refactoring.
                        Open

                                attach: function () {
                                    var args = _.toArray(arguments);
                                    this.trigger.apply(this, ['do:view:attach', this].concat(args));
                        
                                    return this;
                        Severity: Major
                        Found in src/module.js and 3 other locations - About 1 hr to fix
                        src/module.js on lines 65..70
                        src/module.js on lines 82..87
                        src/module.js on lines 100..105

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 67.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 4 locations. Consider refactoring.
                        Open

                                route: function () {
                                    var args = _.toArray(arguments);
                                    this.trigger.apply(this, ['do:route:register', this].concat(args));
                        
                                    return this;
                        Severity: Major
                        Found in src/module.js and 3 other locations - About 1 hr to fix
                        src/module.js on lines 65..70
                        src/module.js on lines 100..105
                        src/module.js on lines 117..122

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 67.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 4 locations. Consider refactoring.
                        Open

                                navigate: function () {
                                    var args = _.toArray(arguments);
                                    this.trigger.apply(this, ['do:route:navigate', this].concat(args));
                        
                                    return this;
                        Severity: Major
                        Found in src/module.js and 3 other locations - About 1 hr to fix
                        src/module.js on lines 82..87
                        src/module.js on lines 100..105
                        src/module.js on lines 117..122

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 67.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 4 locations. Consider refactoring.
                        Open

                                render: function () {
                                    var args = _.toArray(arguments);
                                    this.trigger.apply(this, ['do:view:render', this].concat(args));
                        
                                    return this;
                        Severity: Major
                        Found in src/module.js and 3 other locations - About 1 hr to fix
                        src/module.js on lines 65..70
                        src/module.js on lines 82..87
                        src/module.js on lines 117..122

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 67.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Function enable has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                    enable: function () {
                                        enabledRegistry[this.map.id] = this;
                                        this.enabled = true;
                        
                                        //Set flag mentioning that the module is enabling,
                        Severity: Minor
                        Found in samples/todo/app.js - About 1 hr to fix

                          Function engines_handlebars has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          var engines_handlebars = function (_, Backbone, Handlebars, Mixin, Observable, Deferrable, Startable) {
                                  var ViewExtension = {
                                          precompile: function (template) {
                                              if (typeof template === 'string') {
                                                  return Handlebars.compile(template);
                          Severity: Minor
                          Found in fossil-core.js - About 1 hr to fix

                            Function engines_handlebars has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            var engines_handlebars = function (_, Backbone, Handlebars, Mixin, Observable, Deferrable, Startable) {
                                    var ViewExtension = {
                                            precompile: function (template) {
                                                if (typeof template === 'string') {
                                                    return Handlebars.compile(template);
                            Severity: Minor
                            Found in samples/fossil-core.js - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language