FuzzyWuzzie/vellum

View on GitHub

Showing 55 of 55 total issues

File example.js has 711 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function (console) { "use strict";
var $estr = function() { return js_Boot.__string_rec(this,''); };
function $extend(from, fields) {
    function Inherit() {} Inherit.prototype = from; var proto = new Inherit();
    for (var name in fields) proto[name] = fields[name];
Severity: Major
Found in example/output/example.js - About 1 day to fix

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

                if(text.charAt(i) == "l") {
                    i++;
                    var _g = text.charAt(i);
                    switch(_g) {
                    case "k":
    Severity: Major
    Found in example/output/example.js and 1 other location - About 7 hrs to fix
    example/output/example.js on lines 158..243

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

    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

                } else if(text.charAt(i) == "d") {
                    i++;
                    var _g1 = text.charAt(i);
                    switch(_g1) {
                    case "k":
    Severity: Major
    Found in example/output/example.js and 1 other location - About 7 hrs to fix
    example/output/example.js on lines 115..243

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

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

        ,printColoured: function(x,y,text,foreground,background) {
            var i = 0;
            var charCount = 0;
            var originalForeground = foreground;
            var originalBackground = background;
    Severity: Major
    Found in example/output/example.js - About 5 hrs to fix

      Function __string_rec has 66 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      js_Boot.__string_rec = function(o,s) {
          if(o == null) return "null";
          if(s.length >= 5) return "<...>";
          var t = typeof(o);
          if(t == "function" && (o.__name__ || o.__ename__)) t = "object";
      Severity: Major
      Found in example/output/example.js - About 2 hrs to fix

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

                        while(_g2 < _g1) {
                            var x = _g2++;
                            var g;
                            if(y < this.get_height()) g = this.glyphs[y][x]; else g = vellum_Glyph.fromChar(" ");
                            row.push(g);
        Severity: Major
        Found in example/output/example.js and 1 other location - About 2 hrs to fix
        example/output/example.js on lines 39..44

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

        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

                        while(_g2 < w) {
                            var x = _g2++;
                            var g;
                            if(x < this.get_width()) g = this.glyphs[y][x]; else g = vellum_Glyph.fromChar(" ");
                            row.push(g);
        Severity: Major
        Found in example/output/example.js and 1 other location - About 2 hrs to fix
        example/output/example.js on lines 62..67

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

        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

            ,equals: function(other) {
                return this.code == other.code && this.foreground == other.foreground && this.background == other.background;
            }
        Severity: Major
        Found in example/output/example.js and 1 other location - About 1 hr to fix
        example/output/example.js on lines 673..675

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

        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

            ,notEquals: function(other) {
                return this.code != other.code || this.foreground != other.foreground || this.background != other.background;
            }
        Severity: Major
        Found in example/output/example.js and 1 other location - About 1 hr to fix
        example/output/example.js on lines 670..672

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

        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

        Method printColoured is too complex (score: 53).
        Open

            public function printColoured(x:Int, y:Int, text:String, ?foreground:Colour, ?background:Colour) {
                var i:Int = 0;
                var charCount:Int = 0;
        
                var originalForeground:Colour = foreground;
        Severity: Critical
        Found in src/vellum/Display.hx by haxe-checkstyle

        Checks the complexity of methods using McCabe simplified cyclomatic complexity check. Complexity levels can be customised using thresholds property.

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

            set_foreground: function(c) {
                if(c == null) this.foreground = vellum_Glyph.CLEAR_FOREGROUND; else this.foreground = c;
                return this.foreground;
            }
        Severity: Minor
        Found in example/output/example.js and 1 other location - About 55 mins to fix
        example/output/example.js on lines 666..669

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

        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

            ,set_background: function(c) {
                if(c == null) this.background = vellum_Glyph.CLEAR_BACKGROUND; else this.background = c;
                return this.background;
            }
        Severity: Minor
        Found in example/output/example.js and 1 other location - About 55 mins to fix
        example/output/example.js on lines 662..665

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

        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 3 locations. Consider refactoring.
        Open

                if(x) window.document.body.onkeypress = $bind(this,this.onKeyPress); else window.document.body.onkeypress = null;
        Severity: Major
        Found in example/output/example.js and 2 other locations - About 50 mins to fix
        example/output/example.js on lines 589..589
        example/output/example.js on lines 590..590

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

        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 3 locations. Consider refactoring.
        Open

                if(x) window.document.body.onkeydown = $bind(this,this.onKeyDown); else window.document.body.onkeydown = null;
        Severity: Major
        Found in example/output/example.js and 2 other locations - About 50 mins to fix
        example/output/example.js on lines 590..590
        example/output/example.js on lines 591..591

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

        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 3 locations. Consider refactoring.
        Open

                if(x) window.document.body.onkeyup = $bind(this,this.onKeyUp); else window.document.body.onkeyup = null;
        Severity: Major
        Found in example/output/example.js and 2 other locations - About 50 mins to fix
        example/output/example.js on lines 589..589
        example/output/example.js on lines 591..591

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

        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

            ,set_height: function(h) {
                vellum_RenderableTerminal.prototype.set_height.call(this,h);
                this.resizeCanvas();
                return this.get_height();
            }
        Severity: Minor
        Found in example/output/example.js and 1 other location - About 50 mins to fix
        example/output/example.js on lines 595..599

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

        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

            ,set_width: function(w) {
                vellum_RenderableTerminal.prototype.set_width.call(this,w);
                this.resizeCanvas();
                return this.get_width();
            }
        Severity: Minor
        Found in example/output/example.js and 1 other location - About 50 mins to fix
        example/output/example.js on lines 600..604

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

        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

        Avoid deeply nested control flow statements.
        Open

                    } else if(text.charAt(i) == "_") if(fore) col = originalForeground; else col = originalBackground; else {
                        var _g2 = text.charAt(i);
                        switch(_g2) {
                        case "k":
                            col = "#000";
        Severity: Major
        Found in example/output/example.js - About 45 mins to fix

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

          var vellum_Font = function(family,size,charWidth,lineHeight,x,y) {
          Severity: Minor
          Found in example/output/example.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                if(i1 != 2) str2 += "," + js_Boot.__string_rec(o[i1],s); else str2 += js_Boot.__string_rec(o[i1],s);
            Severity: Major
            Found in example/output/example.js - About 45 mins to fix
              Severity
              Category
              Status
              Source
              Language