kuasha/cosmos

View on GitHub
samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-r.js

Summary

Maintainability
F
1 wk
Test Coverage

Function RHighlightRules has 136 lines of code (exceeds 25 allowed). Consider refactoring.
Open

   var RHighlightRules = function()
   {

      var keywords = lang.arrayToMap(
            ("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass")

    Function TexHighlightRules has 62 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var TexHighlightRules = function(textClass) {
    
        if (!textClass)
            textClass = "text";
    
    

      File mode-r.js has 267 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      ace.define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
      "use strict";
      
      var oop = require("../lib/oop");
      var lang = require("../lib/lang");

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

        ace.define("ace/mode/r_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules"], function(require, exports, module)
        {
        
           var oop = require("../lib/oop");
           var lang = require("../lib/lang");
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-rhtml.js on lines 2389..2545

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

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

        ace.define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
        "use strict";
        
        var oop = require("../lib/oop");
        var lang = require("../lib/lang");
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-rhtml.js on lines 2310..2387
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-tex.js on lines 1..78

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

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

        ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
        "use strict";
        
        var Range = require("../range").Range;
        
        
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-c9search.js on lines 147..185
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-c_cpp.js on lines 223..261
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-coffee.js on lines 203..241
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-coldfusion.js on lines 357..395
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-csharp.js on lines 136..174
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-css.js on lines 145..183
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-curly.js on lines 357..395
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-dart.js on lines 223..261
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-django.js on lines 357..395
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-dot.js on lines 1..39
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-ejs.js on lines 793..831
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-glsl.js on lines 223..261
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-golang.js on lines 154..192
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-groovy.js on lines 357..395
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-handlebars.js on lines 357..395
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-haxe.js on lines 139..177
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-html.js on lines 357..395
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-html_ruby.js on lines 1073..1111
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-jack.js on lines 111..149
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-java.js on lines 357..395
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-javascript - Copy.js on lines 357..395
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-javascript.js on lines 357..395
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-json.js on lines 69..107
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-jsp.js on lines 977..1015
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-jsx.js on lines 164..202
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-less.js on lines 230..268
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-liquid.js on lines 885..923
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-livescript.js on lines 1..39
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-logiql.js on lines 520..558
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-lsl.js on lines 95..133
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-luapage.js on lines 357..395
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-markdown.js on lines 357..395
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-nix.js on lines 223..261
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-ocaml.js on lines 309..347
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-perl.js on lines 134..172
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-powershell.js on lines 142..180
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-protobuf.js on lines 223..261
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-rdoc.js on lines 111..149
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-rhtml.js on lines 357..395
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-ruby.js on lines 226..264
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-scad.js on lines 155..193
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-scala.js on lines 357..395
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-scss.js on lines 255..293
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-sjs.js on lines 357..395
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-smarty.js on lines 357..395
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-soy_template.js on lines 357..395
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-svg.js on lines 966..1004
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-tcl.js on lines 237..275
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-tex.js on lines 80..118
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-textile.js on lines 65..103
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-twig.js on lines 357..395
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-typescript.js on lines 357..395
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-vala.js on lines 874..912
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-velocity.js on lines 357..395
        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-yaml.js on lines 82..120

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

        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

        ace.define("ace/mode/r",["require","exports","module","ace/range","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/r_highlight_rules","ace/mode/matching_brace_outdent","ace/unicode"], function(require, exports, module) {
           "use strict";
        
           var Range = require("../range").Range;
           var oop = require("../lib/oop");
        samples/adminpanel/app/bower_components/ace-builds/src/mode-r.js on lines 278..302

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

        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

        There are no issues that match your filters.

        Category
        Status