carlmw/gitlactica

View on GitHub

Showing 34 of 34 total issues

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

module.exports = function () {
  var i = 0,
      added = [],
      distance = 20000,
      pos = { x: 0, y: 0, z: 0 };
Severity: Minor
Found in lib/effects/add_planet.js - About 1 hr to fix

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

    module.exports = function (grunt) {
      var server;
      grunt.registerTask('start_test_server', function() {
        nock.disableNetConnect();
        nock('https://api.github.com')
    Severity: Minor
    Found in tasks/test_server.js - About 1 hr to fix

      Function explosions has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = function explosions (scene) {
        var lights = _.times(EXPLOSION_COUNT, function () {
          var l = light.clone();
          scene.add(l);
          return l;
      Severity: Minor
      Found in adapters/webgl/explosions.js - About 1 hr to fix

        Function exports has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        module.exports = function (animation, renderer, name, repo, colour, additions, deletions, next) {
        Severity: Major
        Found in lib/effects/fire_weapons.js - About 1 hr to fix

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

          module.exports = [
            { 
              type: 'PushEvent',
              repo: { name: 'carlmw/gitlactica' },
              payload: {
          Severity: Minor
          Found in tasks/responses/users/carlmw/received_events.js and 1 other location - About 55 mins to fix
          tasks/responses/users/carlmw/events.js on lines 1..10

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

          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

          module.exports =[
            { 
              type: 'PushEvent',
              repo: { name: 'carlmw/gitlactica' },
              payload: {
          Severity: Minor
          Found in tasks/responses/users/carlmw/events.js and 1 other location - About 55 mins to fix
          tasks/responses/users/carlmw/received_events.js on lines 1..10

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

          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 exports has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          module.exports = function Star (scene, x, y, z, tex1, tex2, tex3) {
          Severity: Major
          Found in adapters/webgl/star.js - About 50 mins to fix

            Function exports has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            module.exports = function commitDetails (animation, renderer, login, message, avatarUrl, next) {
            Severity: Minor
            Found in lib/effects/commit_details.js - About 45 mins to fix

              Function exports has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              module.exports = function (animation, renderer, name, repo, colour, next) {
              Severity: Minor
              Found in lib/effects/fire_change_bomb.js - About 45 mins to fix

                Function languageColourMapper has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                module.exports = function languageColourMapper (input) {
                  return _(input).reduce(function (memo, item, language) {
                    var colour = item.color;
                    if (item.group) {
                      colour = input[item.group].color;
                Severity: Minor
                Found in lib/language_colour_mapper.js - About 45 mins 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 tween has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  tween: function (from, to, duration, onUpdate, next) {
                Severity: Minor
                Found in adapters/animation.js - About 35 mins to fix

                  Function exports has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  module.exports = function (templates, el) {
                    return function (template, data) {
                      template = template || '/';
                      el.innerHTML = templates[template] ? templates[template](data || {}) : '';
                      if (typeof(log) !== 'undefined') {
                  Severity: Minor
                  Found in lib/render_template.js - About 25 mins 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 network has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  module.exports = function network (subspace, git) {
                    var alreadyPlayed = [];
                  
                    subspace.on('fetch:events', function (login) {
                      git.events(login).then(handleEvents);
                  Severity: Minor
                  Found in lib/network.js - About 25 mins 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 exports has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  module.exports = function (animation, renderer, name, repo, colour, additions, deletions, next) {
                    renderer.addWeapons(name);
                    if (deletions > 0 ) renderer.showBeam();
                    if (additions + deletions === 0) return next();
                    var currentComplete = 0,
                  Severity: Minor
                  Found in lib/effects/fire_weapons.js - About 25 mins 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

                  Severity
                  Category
                  Status
                  Source
                  Language