kuasha/cosmos

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

Summary

Maintainability
F
1 mo
Test Coverage

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

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

var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;

    Function PgsqlHighlightRules has 552 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var PgsqlHighlightRules = function() {
        var keywords = (
            "abort|absolute|abstime|access|aclitem|action|add|admin|after|aggregate|all|also|alter|always|" +
            "analyse|analyze|and|any|anyarray|anyelement|anyenum|anynonarray|anyrange|array|as|asc|" +
            "assertion|assignment|asymmetric|at|attribute|authorization|backward|before|begin|between|" +

      Function JavaScriptHighlightRules has 293 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var JavaScriptHighlightRules = function() {
          var keywordMapper = this.createKeywordMapper({
              "variable.language":
                  "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|"  + // Constructors
                  "Namespace|QName|XML|XMLList|"                                             + // E4X

        Function PythonHighlightRules has 134 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var PythonHighlightRules = function() {
        
            var keywords = (
                "and|as|assert|break|class|continue|def|del|elif|else|except|exec|" +
                "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" +

          Function PerlHighlightRules has 114 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var PerlHighlightRules = function() {
          
              var keywords = (
                  "base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|" +
                   "no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars"

            Function JsonHighlightRules has 53 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var JsonHighlightRules = function() {
                this.$rules = {
                    "start" : [
                        {
                            token : "variable", // single line

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

              ace.define("ace/mode/pgsql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/perl_highlight_rules","ace/mode/python_highlight_rules","ace/mode/json_highlight_rules","ace/mode/javascript_highlight_rules"], function(require, exports, module) {
              
              var oop = require("../lib/oop");
              var lang = require("../lib/lang");
              var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
              samples/adminpanel/app/bower_components/ace-builds/src/mode-pgsql.js on lines 714..1298

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

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

              ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
              "use strict";
              
              var oop = require("../lib/oop");
              var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-coldfusion.js on lines 45..355
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-curly.js on lines 45..355
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-django.js on lines 45..355
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-ejs.js on lines 189..499
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-ftl.js on lines 189..499
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-groovy.js on lines 45..355
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-handlebars.js on lines 45..355
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-html.js on lines 45..355
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-html_ruby.js on lines 189..499
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-jade.js on lines 45..355
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-java.js on lines 45..355
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-javascript - Copy.js on lines 45..355
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-javascript.js on lines 45..355
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-jsp.js on lines 189..499
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-liquid.js on lines 189..499
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-luapage.js on lines 45..355
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-markdown.js on lines 45..355
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-rhtml.js on lines 45..355
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-scala.js on lines 45..355
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-sjs.js on lines 45..355
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-smarty.js on lines 45..355
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-soy_template.js on lines 45..355
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-svg.js on lines 654..964
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-twig.js on lines 45..355
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-typescript.js on lines 45..355
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-velocity.js on lines 45..355

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

              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/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
              "use strict";
              
              var oop = require("../lib/oop");
              var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-python.js on lines 1..155

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

              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/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
              "use strict";
              
              var oop = require("../lib/oop");
              var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-perl.js on lines 1..132

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

              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

              ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
              "use strict";
              
              var oop = require("../lib/oop");
              var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-json.js on lines 1..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 297.

              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/pgsql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pgsql_highlight_rules","ace/range"], function(require, exports, module) {
              
              var oop = require("../lib/oop");
              var TextMode = require("../mode/text").Mode;
              var PgsqlHighlightRules = require("./pgsql_highlight_rules").PgsqlHighlightRules;
              samples/adminpanel/app/bower_components/ace-builds/src/mode-pgsql.js on lines 1300..1328

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

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

              ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
              "use strict";
              
              var oop = require("../lib/oop");
              var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-c_cpp.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-coldfusion.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-csharp.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-curly.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-d.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-dart.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-django.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-dot.js on lines 41..83
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-ejs.js on lines 145..187
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-ftl.js on lines 145..187
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-glsl.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-golang.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-groovy.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-handlebars.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-haxe.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-html.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-html_ruby.js on lines 145..187
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-jade.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-java.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-javascript - Copy.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-javascript.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-jsp.js on lines 145..187
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-jsx.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-liquid.js on lines 145..187
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-luapage.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-markdown.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-mysql.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-nix.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-objectivec.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-protobuf.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-rhtml.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-scad.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-scala.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-sjs.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-smarty.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-soy_template.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-svg.js on lines 610..652
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-twig.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-typescript.js on lines 1..43
              samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-velocity.js on lines 1..43

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

              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