Plate-Project/plate

View on GitHub

Showing 549 of 549 total issues

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

            if (r_mark_lArI()) {
              sbp.bra = sbp.cursor;
              sbp.slice_del();
            } else {
              sbp.cursor = sbp.limit - v_2;
Severity: Major
Found in plate/static/js/lunr/lunr.tr.js and 1 other location - About 7 hrs to fix
plate/static/js/lunr/lunr.tr.js on lines 626..645

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

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 (r_mark_lArI()) {
                  sbp.bra = sbp.cursor;
                  sbp.slice_del();
                } else {
                  sbp.cursor = sbp.limit - v_4;
Severity: Major
Found in plate/static/js/lunr/lunr.tr.js and 1 other location - About 7 hrs to fix
plate/static/js/lunr/lunr.tr.js on lines 660..679

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

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

/*!
 * Lunr languages, `Finnish` language
 * https://github.com/MihaiValentin/lunr-languages
 *
 * Copyright 2014, Mihai Valentin
Severity: Minor
Found in plate/static/js/lunr/lunr.fi.js - About 7 hrs to fix

    Function stemmer has 178 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        lunr.da.stemmer = (function() {
          /* create the wrapped stemmer object */
          var Among = lunr.stemmerSupport.Among,
            SnowballProgram = lunr.stemmerSupport.SnowballProgram,
            st = new function DanishStemmer() {
    Severity: Major
    Found in plate/static/js/lunr/lunr.da.js - About 7 hrs to fix

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

                  while (true) {
                    sbp.bra = sbp.cursor;
                    among_var = sbp.find_among(a_0, 11);
                    if (among_var) {
                      sbp.ket = sbp.cursor;
      Severity: Major
      Found in plate/static/js/lunr/lunr.du.js and 1 other location - About 7 hrs to fix
      plate/static/js/lunr/lunr.es.js on lines 279..308

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

      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 (true) {
                    sbp.bra = sbp.cursor;
                    among_var = sbp.find_among(a_0, 6);
                    if (among_var) {
                      sbp.ket = sbp.cursor;
      Severity: Major
      Found in plate/static/js/lunr/lunr.es.js and 1 other location - About 7 hrs to fix
      plate/static/js/lunr/lunr.du.js on lines 117..146

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

      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

                      case 6:
                        if (!r_R1())
                          return false;
                        sbp.slice_del();
                        sbp.ket = sbp.cursor;
      Severity: Major
      Found in plate/static/js/lunr/lunr.es.js and 2 other locations - About 6 hrs to fix
      plate/static/js/lunr/lunr.it.js on lines 455..475
      plate/static/js/lunr/lunr.pt.js on lines 361..381

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

      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

                    case 7:
                      if (!r_R1())
                        return false;
                      sbp.slice_del();
                      sbp.ket = sbp.cursor;
      Severity: Major
      Found in plate/static/js/lunr/lunr.it.js and 2 other locations - About 6 hrs to fix
      plate/static/js/lunr/lunr.es.js on lines 420..440
      plate/static/js/lunr/lunr.pt.js on lines 361..381

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

      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

                    case 5:
                      if (!r_R1())
                        return false;
                      sbp.slice_del();
                      sbp.ket = sbp.cursor;
      Severity: Major
      Found in plate/static/js/lunr/lunr.pt.js and 2 other locations - About 6 hrs to fix
      plate/static/js/lunr/lunr.es.js on lines 420..440
      plate/static/js/lunr/lunr.it.js on lines 455..475

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

      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 performObjectSearch has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
      Open

        performObjectSearch : function(object, otherterms) {
          var filenames = this._index.filenames;
          var objects = this._index.objects;
          var objnames = this._index.objnames;
          var titles = this._index.titles;
      Severity: Minor
      Found in doc/build/html/_static/searchtools.js - About 6 hrs 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 DanishStemmer has 169 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              st = new function DanishStemmer() {
                var a_0 = [new Among("hed", -1, 1), new Among("ethed", 0, 1),
                    new Among("ered", -1, 1), new Among("e", -1, 1),
                    new Among("erede", 3, 1), new Among("ende", 3, 1),
                    new Among("erende", 5, 1), new Among("ene", 3, 1),
      Severity: Major
      Found in plate/static/js/lunr/lunr.da.js - About 6 hrs to fix

        Function r_standard_suffix has 165 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                  function r_standard_suffix() {
                    var among_var, v_1;
                    sbp.ket = sbp.cursor;
                    among_var = sbp.find_among_b(a_4, 43);
                    if (among_var) {
        Severity: Major
        Found in plate/static/js/lunr/lunr.fr.js - About 6 hrs to fix

          Function query has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
          Open

            query : function(query) {
              var i;
              var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
          
              // stem the searchterms and add them to the correct list
          Severity: Minor
          Found in doc/build/html/_static/searchtools.js - About 6 hrs 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 stemmer has 152 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              lunr.no.stemmer = (function() {
                /* create the wrapped stemmer object */
                var Among = lunr.stemmerSupport.Among,
                  SnowballProgram = lunr.stemmerSupport.SnowballProgram,
                  st = new function NorwegianStemmer() {
          Severity: Major
          Found in plate/static/js/lunr/lunr.no.js - About 6 hrs to fix

            Function Stemmer has 151 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var Stemmer = function() {
            
              var step2list = {
                ational: 'ate',
                tional: 'tion',
            Severity: Major
            Found in doc/build/html/_static/searchtools.js - About 6 hrs to fix

              Function stemmer has 151 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  lunr.sv.stemmer = (function() {
                    /* create the wrapped stemmer object */
                    var Among = lunr.stemmerSupport.Among,
                      SnowballProgram = lunr.stemmerSupport.SnowballProgram,
                      st = new function SwedishStemmer() {
              Severity: Major
              Found in plate/static/js/lunr/lunr.sv.js - About 6 hrs to fix

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

                              if (!r_mark_sUnUz()) {
                                sbp.cursor = sbp.limit - v_1;
                                if (!r_mark_lAr()) {
                                  sbp.cursor = sbp.limit - v_1;
                                  if (!r_mark_yUm()) {
                Severity: Major
                Found in plate/static/js/lunr/lunr.tr.js and 1 other location - About 5 hrs to fix
                plate/static/js/lunr/lunr.tr.js on lines 538..551

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

                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 (!r_mark_sUnUz()) {
                                        sbp.cursor = sbp.limit - v_2;
                                        if (!r_mark_lAr()) {
                                          sbp.cursor = sbp.limit - v_2;
                                          if (!r_mark_yUm()) {
                Severity: Major
                Found in plate/static/js/lunr/lunr.tr.js and 1 other location - About 5 hrs to fix
                plate/static/js/lunr/lunr.tr.js on lines 439..452

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

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

                        st = new function NorwegianStemmer() {
                          var a_0 = [new Among("a", -1, 1), new Among("e", -1, 1),
                              new Among("ede", 1, 1), new Among("ande", 1, 1),
                              new Among("ende", 1, 1), new Among("ane", 1, 1),
                              new Among("ene", 1, 1), new Among("hetene", 6, 1),
                Severity: Major
                Found in plate/static/js/lunr/lunr.no.js - About 5 hrs to fix

                  Function SwedishStemmer has 142 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          st = new function SwedishStemmer() {
                            var a_0 = [new Among("a", -1, 1), new Among("arna", 0, 1),
                                new Among("erna", 0, 1), new Among("heterna", 2, 1),
                                new Among("orna", 0, 1), new Among("ad", -1, 1),
                                new Among("e", -1, 1), new Among("ade", 6, 1),
                  Severity: Major
                  Found in plate/static/js/lunr/lunr.sv.js - About 5 hrs to fix
                    Severity
                    Category
                    Status
                    Source
                    Language