themouette/fossil-core

View on GitHub

Showing 86 of 86 total issues

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

var Fossil = (function () {
var deferred = function ($) {
        return $.Deferred;
    }(jquery);
var utils = function (_) {
Severity: Major
Found in samples/fossil-core.js and 1 other location - About 2 mos to fix
fossil-core.js on lines 1..1149

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 10205.

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

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

var Fossil = (function () {
var deferred = function ($) {
        return $.Deferred;
    }(jquery);
var utils = function (_) {
Severity: Major
Found in fossil-core.js and 1 other location - About 2 mos to fix
samples/fossil-core.js on lines 1..1149

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 10205.

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

var Fossil = (function () {
var deferred = function ($) {
        return $.Deferred;
    }(jquery);
var utils = function (_) {
Severity: Minor
Found in fossil-core.js - About 6 days 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 Fossil has a Cognitive Complexity of 305 (exceeds 5 allowed). Consider refactoring.
Open

var Fossil = (function () {
var deferred = function ($) {
        return $.Deferred;
    }(jquery);
var utils = function (_) {
Severity: Minor
Found in samples/fossil-core.js - About 6 days 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 Fossil has 1140 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var Fossil = (function () {
var deferred = function ($) {
        return $.Deferred;
    }(jquery);
var utils = function (_) {
Severity: Major
Found in fossil-core.js - About 5 days to fix

    Function Fossil has 1140 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var Fossil = (function () {
    var deferred = function ($) {
            return $.Deferred;
        }(jquery);
    var utils = function (_) {
    Severity: Major
    Found in samples/fossil-core.js - About 5 days to fix

      Function newContext has 929 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function newContext(contextName) {
              var inCheckLoaded, Module, context, handlers,
                  checkLoadedTimeoutId,
                  config = {
                      //Defaults. Do not set a default for map
      Severity: Major
      Found in samples/todo/app.js - About 4 days to fix

        File app.js has 1309 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /** vim: et:ts=4:sw=4:sts=4
         * @license RequireJS 2.1.9 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
         * Available via the MIT or new BSD license.
         * see: http://github.com/jrburke/requirejs for details
         */
        Severity: Major
        Found in samples/todo/app.js - About 3 days to fix

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

          define('kernel', [
              'jquery',
              'underscore',
              './application',
              'fossil/engines/underscore',
          Severity: Major
          Found in samples/todo/src/kernel.js and 1 other location - About 3 days to fix
          samples/todo/app.js on lines 2071..2142

          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 577.

          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

          define('kernel', [
              'jquery',
              'underscore',
              './application',
              'fossil/engines/underscore',
          Severity: Major
          Found in samples/todo/app.js and 1 other location - About 3 days to fix
          samples/todo/src/kernel.js on lines 1..72

          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 577.

          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

          File fossil-core.js has 1141 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          var Fossil = (function () {
          var deferred = function ($) {
                  return $.Deferred;
              }(jquery);
          var utils = function (_) {
          Severity: Major
          Found in samples/fossil-core.js - About 2 days to fix

            File fossil-core.js has 1141 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            var Fossil = (function () {
            var deferred = function ($) {
                    return $.Deferred;
                }(jquery);
            var utils = function (_) {
            Severity: Major
            Found in fossil-core.js - About 2 days to fix

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

              module.exports = function(grunt) {
                "use strict";
              
                var versions = {
                  firefox: 25,
              Severity: Major
              Found in Gruntfile.js - About 1 day to fix

                Function mixins_deferrable has 195 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var mixins_deferrable = function (_, Deferred) {
                        
                        var messages = {
                                timeout: 'async process timed out',
                                rejected: 'some asynchronous process failed',
                Severity: Major
                Found in fossil-core.js - About 7 hrs to fix

                  Function mixins_deferrable has 195 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var mixins_deferrable = function (_, Deferred) {
                          
                          var messages = {
                                  timeout: 'async process timed out',
                                  rejected: 'some asynchronous process failed',
                  Severity: Major
                  Found in samples/fossil-core.js - About 7 hrs to fix

                    Function mixins_observable has 128 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var mixins_observable = function (_, Backbone) {
                            
                            var exposedPubsubProperties = [
                                    '_listenerId',
                                    'createPubSub'
                    Severity: Major
                    Found in fossil-core.js - About 5 hrs to fix

                      Function mixins_observable has 128 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      var mixins_observable = function (_, Backbone) {
                              
                              var exposedPubsubProperties = [
                                      '_listenerId',
                                      'createPubSub'
                      Severity: Major
                      Found in samples/fossil-core.js - About 5 hrs to fix

                        Function services_routing has 127 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        var services_routing = function (_, Backbone, utils, Service) {
                                
                                var Routing = Service.extend({
                                        prefix: '',
                                        router: null,
                        Severity: Major
                        Found in fossil-core.js - About 5 hrs to fix

                          Function services_routing has 127 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          var services_routing = function (_, Backbone, utils, Service) {
                                  
                                  var Routing = Service.extend({
                                          prefix: '',
                                          router: null,
                          Severity: Major
                          Found in samples/fossil-core.js - About 5 hrs to fix

                            Function callPlugin has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                        callPlugin: function () {
                                            var map = this.map,
                                                id = map.id,
                                                //Map already normalized the prefix.
                                                pluginMap = makeModuleMap(map.prefix);
                            Severity: Major
                            Found in samples/todo/app.js - About 3 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language