fossasia/loklak_webclient

View on GitHub

Showing 915 of 915 total issues

Avoid too many return statements within this function.
Open

        return m1;
Severity: Major
Found in iframely/lib/plugins/validators/sync/07_duplicateLink.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        return (m1.width > m2.width || m1.height > m2.height) ? m1 : m2;
    Severity: Major
    Found in iframely/lib/plugins/validators/sync/07_duplicateLink.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return m2;
      Severity: Major
      Found in iframely/lib/plugins/validators/sync/07_duplicateLink.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                                        return;
        Severity: Major
        Found in iframely/lib/core.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                              return;
          Severity: Major
          Found in iframely/lib/loader/pluginLoader.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                            return;
            Severity: Major
            Found in iframely/lib/loader/pluginLoader.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                                  return -1;
              Severity: Major
              Found in iframely/lib/core.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                    return 1;
                Severity: Major
                Found in iframely/lib/core.js - About 30 mins to fix

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

                          setOpacity: function(t) {
                              return this.options.opacity = t,
                              this._map && this._updateOpacity(),
                              this
                          },
                  Severity: Minor
                  Found in app/js/components/leaflet.js and 1 other location - About 30 mins to fix
                  app/js/components/leaflet.js on lines 1463..1467

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

                  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 (whitelistRecord.isAllowed('oembed.video', 'ssl') || whitelistRecord.isAllowed('oembed.rich', 'ssl')) {
                                  href = href.replace(/^http:\/\//i, '//');
                              }
                  Severity: Minor
                  Found in iframely/plugins/custom/oembed-video-responsive-nonhtml5.js and 1 other location - About 30 mins to fix
                  iframely/plugins/custom/oembed-video-responsive.js on lines 18..20

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

                  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

                                  $video.append('<source />')
                                      .children('source')
                                      .attr('src', data.href)
                                      .attr('type', data.type);
                  Severity: Minor
                  Found in iframely/lib/html-utils.js and 1 other location - About 30 mins to fix
                  iframely/static/js/iframely.js on lines 385..388

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

                  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 too many return statements within this function.
                  Open

                                  return 1;
                  Severity: Major
                  Found in iframely/lib/core.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                    return;
                    Severity: Major
                    Found in iframely/lib/loader/pluginLoader.js - About 30 mins to fix

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

                                      var responseJSON = function() {
                                          try {
                                              return JSON.parse(jqXHR.responseText);
                                          } catch(e) {};
                                      }();
                      Severity: Minor
                      Found in iframely/static/js/iframely.js and 1 other location - About 30 mins to fix
                      iframely/static/js/iframely.js on lines 172..176

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

                      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 too many return statements within this function.
                      Open

                                  return 0;
                      Severity: Major
                      Found in iframely/lib/core.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                                return;
                        Severity: Major
                        Found in iframely/lib/loader/pluginLoader.js - About 30 mins to fix

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

                                      if (whitelistRecord.isAllowed('oembed.video', 'ssl') || whitelistRecord.isAllowed('oembed.rich', 'ssl')) {
                                          href = href.replace(/^http:\/\//i, '//');
                                      }
                          Severity: Minor
                          Found in iframely/plugins/custom/oembed-video-responsive.js and 1 other location - About 30 mins to fix
                          iframely/plugins/custom/oembed-video-responsive-nonhtml5.js on lines 18..20

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

                          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

                                          var responseJSON = function(){
                                              try {
                                                  return JSON.parse(jqXHR.responseText)
                                              } catch(e){};
                                          }();
                          Severity: Minor
                          Found in iframely/static/js/iframely.js and 1 other location - About 30 mins to fix
                          iframely/static/js/iframely.js on lines 195..199

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

                          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

                                          $video.append('<source />')
                                              .children('source')
                                              .attr('src', data.href)
                                              .attr('type', data.type);
                          Severity: Minor
                          Found in iframely/static/js/iframely.js and 1 other location - About 30 mins to fix
                          iframely/lib/html-utils.js on lines 183..186

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

                          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 too many return statements within this function.
                          Open

                                  return m2;
                          Severity: Major
                          Found in iframely/lib/plugins/validators/sync/07_duplicateLink.js - About 30 mins to fix
                            Severity
                            Category
                            Status
                            Source
                            Language