stevenvelozo/orator-wiki

View on GitHub

Showing 145 of 145 total issues

File epiceditor.js has 1922 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * EpicEditor - An Embeddable JavaScript Markdown Editor (https://github.com/OscarGodson/EpicEditor)
 * Copyright (c) 2011-2012, Oscar Godson. (MIT Licensed)
 */

Severity: Major
Found in Site/Html/js/epiceditor/js/epiceditor.js - About 5 days to fix

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

        if (top && (cap = this.rules.table.exec(src))) {
          src = src.substring(cap[0].length);
    
          item = {
            type: 'table',
    Severity: Major
    Found in Site/Html/js/marked.js and 1 other location - About 2 days to fix
    Site/Html/js/epiceditor/js/epiceditor.js on lines 2207..2238

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

    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

        if (top && (cap = this.rules.table.exec(src))) {
          src = src.substring(cap[0].length);
    
          item = {
            type: 'table',
    Severity: Major
    Found in Site/Html/js/epiceditor/js/epiceditor.js and 1 other location - About 2 days to fix
    Site/Html/js/marked.js on lines 379..410

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

    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

        if (top && (cap = this.rules.nptable.exec(src))) {
          src = src.substring(cap[0].length);
    
          item = {
            type: 'table',
    Severity: Major
    Found in Site/Html/js/marked.js and 1 other location - About 2 days to fix
    Site/Html/js/epiceditor/js/epiceditor.js on lines 2047..2076

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

    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

        if (top && (cap = this.rules.nptable.exec(src))) {
          src = src.substring(cap[0].length);
    
          item = {
            type: 'table',
    Severity: Major
    Found in Site/Html/js/epiceditor/js/epiceditor.js and 1 other location - About 2 days to fix
    Site/Html/js/marked.js on lines 208..237

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

    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 marked.js has 901 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * marked - a markdown parser
     * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)
     * https://github.com/chjj/marked
     */
    Severity: Major
    Found in Site/Html/js/marked.js - About 2 days to fix

      Function load has 422 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        EpicEditor.prototype.load = function (callback) {
      
          // Get out early if it's already loaded
          if (this.is('loaded')) { return this; }
      
      
      Severity: Major
      Found in Site/Html/js/epiceditor/js/epiceditor.js - About 2 days to fix

        Function token has 213 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Lexer.prototype.token = function(src, top, bq) {
          var src = src.replace(/^ +$/gm, '')
            , next
            , loose
            , cap
        Severity: Major
        Found in Site/Html/js/marked.js - About 1 day to fix

          Function token has 201 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Lexer.prototype.token = function(src, top) {
            var src = src.replace(/^ +$/gm, '')
              , next
              , loose
              , cap
          Severity: Major
          Found in Site/Html/js/epiceditor/js/epiceditor.js - About 1 day to fix

            Function EpicEditor has 132 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function EpicEditor(options) {
                // Default settings will be overwritten/extended by options arg
                var self = this
                  , opts = options || {}
                  , _defaultFileSchema
            Severity: Major
            Found in Site/Html/js/epiceditor/js/epiceditor.js - About 5 hrs to fix

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

              function Lexer(options) {
                this.tokens = [];
                this.tokens.links = {};
                this.options = options || marked.defaults;
                this.rules = block.normal;
              Severity: Major
              Found in Site/Html/js/marked.js and 1 other location - About 5 hrs to fix
              Site/Html/js/epiceditor/js/epiceditor.js on lines 1942..1955

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

              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

              function Lexer(options) {
                this.tokens = [];
                this.tokens.links = {};
                this.options = options || marked.defaults;
                this.rules = block.normal;
              Severity: Major
              Found in Site/Html/js/epiceditor/js/epiceditor.js and 1 other location - About 5 hrs to fix
              Site/Html/js/marked.js on lines 101..114

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

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

              Parser.prototype.tok = function() {
                switch (this.token.type) {
                  case 'space': {
                    return '';
                  }
              Severity: Major
              Found in Site/Html/js/epiceditor/js/epiceditor.js - About 5 hrs to fix

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

                InlineLexer.prototype.mangle = function(text) {
                  var out = ''
                    , l = text.length
                    , i = 0
                    , ch;
                Severity: Major
                Found in Site/Html/js/epiceditor/js/epiceditor.js and 1 other location - About 4 hrs to fix
                Site/Html/js/marked.js on lines 732..747

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

                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

                InlineLexer.prototype.mangle = function(text) {
                  var out = ''
                    , l = text.length
                    , i = 0
                    , ch;
                Severity: Major
                Found in Site/Html/js/marked.js and 1 other location - About 4 hrs to fix
                Site/Html/js/epiceditor/js/epiceditor.js on lines 2561..2576

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

                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

                    if (cap = this.rules.code.exec(src)) {
                      src = src.substring(cap[0].length);
                      cap = cap[0].replace(/^ {4}/gm, '');
                      this.tokens.push({
                        type: 'code',
                Severity: Major
                Found in Site/Html/js/marked.js and 1 other location - About 4 hrs to fix
                Site/Html/js/epiceditor/js/epiceditor.js on lines 2012..2022

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

                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

                    if (cap = this.rules.code.exec(src)) {
                      src = src.substring(cap[0].length);
                      cap = cap[0].replace(/^ {4}/gm, '');
                      this.tokens.push({
                        type: 'code',
                Severity: Major
                Found in Site/Html/js/epiceditor/js/epiceditor.js and 1 other location - About 4 hrs to fix
                Site/Html/js/marked.js on lines 173..183

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

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

                InlineLexer.prototype.output = function(src) {
                  var out = ''
                    , link
                    , text
                    , href
                Severity: Major
                Found in Site/Html/js/epiceditor/js/epiceditor.js - About 4 hrs to fix

                  Function output has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  InlineLexer.prototype.output = function(src) {
                    var out = ''
                      , link
                      , text
                      , href
                  Severity: Major
                  Found in Site/Html/js/marked.js - About 4 hrs to fix

                    Function tok has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Parser.prototype.tok = function() {
                      switch (this.token.type) {
                        case 'space': {
                          return '';
                        }
                    Severity: Major
                    Found in Site/Html/js/marked.js - About 3 hrs to fix
                      Severity
                      Category
                      Status
                      Source
                      Language