phodal/congee

View on GitHub

Showing 421 of 421 total issues

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

        toHsl: function() {
            var hsl = rgbToHsl(this._r, this._g, this._b);
            return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
        },
Severity: Major
Found in scripts/spectrum/spectrum.js and 1 other location - About 2 hrs to fix
scripts/spectrum/spectrum.js on lines 1285..1288

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

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

    function stringInputToObject(color) {

        color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();
        var named = false;
        if (names[color]) {
Severity: Major
Found in scripts/spectrum/spectrum.js - About 2 hrs to fix

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

        function setupWidgetsLifecycleStart( widgetsRepo ) {
            var editor = widgetsRepo.editor,
                processedWidgetOnly,
                snapshotLoaded;
    
    
    Severity: Major
    Found in ckeditor/plugins/widget/plugin.js - About 2 hrs to fix

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

          function copySingleWidget( widget, isCut ) {
              var editor = widget.editor,
                  doc = editor.document;
      
              // We're still handling previous copy/cut.
      Severity: Major
      Found in ckeditor/plugins/widget/plugin.js - About 2 hrs to fix

        Function makeModuleMap has 52 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {
                    var url, pluginModule, suffix, nameParts,
                        prefix = null,
                        parentName = parentModuleMap ? parentModuleMap.name : null,
                        originalName = name,
        Severity: Major
        Found in scripts/libs/require.js - About 2 hrs to fix

          Function create__createDuration has 52 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function create__createDuration (input, key) {
                  var duration = input,
                      // matching against regexp is expensive, do it on demand
                      match = null,
                      sign,
          Severity: Major
          Found in ckeditor/plugins/autosave/js/moment.js - About 2 hrs to fix

            Function updateUI has 52 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    function updateUI() {
            
                        textInput.removeClass("sp-validation-error");
            
                        updateHelperLocations();
            Severity: Major
            Found in scripts/spectrum/spectrum.js - About 2 hrs to fix

              Function addWidgetCommand has 52 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function addWidgetCommand( editor, widgetDef ) {
                      editor.addCommand( widgetDef.name, {
                          exec: function( editor, commandData ) {
                              var focused = editor.widgets.focused;
                              // If a widget of the same type is focused, start editing.
              Severity: Major
              Found in ckeditor/plugins/widget/plugin.js - About 2 hrs to fix

                Function setupWidgetsLifecycleEnd has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function setupWidgetsLifecycleEnd( widgetsRepo ) {
                        var editor = widgetsRepo.editor,
                            downcastingSessions = {};
                
                        // Listen before htmlDP#htmlFilter is applied to cache all widgets, because we'll
                Severity: Major
                Found in ckeditor/plugins/widget/plugin.js - About 2 hrs to fix

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

                                "rgb("  + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" :
                  Severity: Major
                  Found in scripts/spectrum/spectrum.js and 1 other location - About 2 hrs to fix
                  scripts/spectrum/spectrum.js on lines 1333..1333

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

                  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

                                "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
                  Severity: Major
                  Found in scripts/spectrum/spectrum.js and 1 other location - About 2 hrs to fix
                  scripts/spectrum/spectrum.js on lines 1332..1332

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

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

                          function normalize(name, baseName, applyMap) {
                              var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex,
                                  foundMap, foundI, foundStarMap, starI, normalizedBaseParts,
                                  baseParts = (baseName && baseName.split('/')),
                                  map = config.map,
                  Severity: Major
                  Found in scripts/libs/require.js - About 2 hrs to fix

                    Function setupMouseObserver has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function setupMouseObserver( widgetsRepo ) {
                            var editor = widgetsRepo.editor;
                    
                            editor.on( 'contentDom', function() {
                                var editable = editor.editable(),
                    Severity: Major
                    Found in ckeditor/plugins/widget/plugin.js - About 2 hrs to fix

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

                      CKEDITOR.plugins.setLang('autosave', 'es', {
                          dateFormat: 'LLL',
                          autoSaveMessage: 'Auto guardado',
                          loadSavedContent: 'Se ha encontrado una versión auto-guardada de este contenido de "{0}". Queréis comparar el contenido de las versiones y elegir cual cargar?',
                          title: 'Compara el contenido auto-guardado con el cargado del sitio web',
                      Severity: Major
                      Found in ckeditor/plugins/autosave/lang/es.js and 10 other locations - About 2 hrs to fix
                      ckeditor/plugins/autosave/lang/ca.js on lines 5..17
                      ckeditor/plugins/autosave/lang/cs.js on lines 5..17
                      ckeditor/plugins/autosave/lang/de.js on lines 5..17
                      ckeditor/plugins/autosave/lang/en.js on lines 5..17
                      ckeditor/plugins/autosave/lang/fr.js on lines 5..17
                      ckeditor/plugins/autosave/lang/ja.js on lines 5..17
                      ckeditor/plugins/autosave/lang/pl.js on lines 5..17
                      ckeditor/plugins/autosave/lang/pt-br.js on lines 5..17
                      ckeditor/plugins/autosave/lang/zh-cn.js on lines 5..17
                      ckeditor/plugins/autosave/lang/zh.js on lines 5..17

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

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

                      CKEDITOR.plugins.setLang('autosave', 'ca', {
                          dateFormat: 'LLL',
                          autoSaveMessage: 'Auto desat',
                          loadSavedContent: 'S\'ha trobat una versió auto-desada d\'aquest contingut de "{0}". Voleu comparar les versions del contingut i escollir quina carregar?',
                          title: 'Compareu el contingut auto-desat amb el contingut carregat del lloc web',
                      Severity: Major
                      Found in ckeditor/plugins/autosave/lang/ca.js and 10 other locations - About 2 hrs to fix
                      ckeditor/plugins/autosave/lang/cs.js on lines 5..17
                      ckeditor/plugins/autosave/lang/de.js on lines 5..17
                      ckeditor/plugins/autosave/lang/en.js on lines 5..17
                      ckeditor/plugins/autosave/lang/es.js on lines 5..17
                      ckeditor/plugins/autosave/lang/fr.js on lines 5..17
                      ckeditor/plugins/autosave/lang/ja.js on lines 5..17
                      ckeditor/plugins/autosave/lang/pl.js on lines 5..17
                      ckeditor/plugins/autosave/lang/pt-br.js on lines 5..17
                      ckeditor/plugins/autosave/lang/zh-cn.js on lines 5..17
                      ckeditor/plugins/autosave/lang/zh.js on lines 5..17

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

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

                      (function ( $ ) {
                      
                          var localization = $.spectrum.localization["ru"] = {
                              cancelText: "отмена",
                              chooseText: "выбрать"
                      Severity: Major
                      Found in scripts/spectrum/i18n/jquery.spectrum-ru.js and 6 other locations - About 2 hrs to fix
                      scripts/spectrum/i18n/jquery.spectrum-dk.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-fa.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-fi.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-ja.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-sv.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-tr.js on lines 5..14

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

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

                      CKEDITOR.plugins.setLang('autosave', 'pt-br', {
                          dateFormat: 'LLL',
                          autoSaveMessage: 'Auto Saved',
                          loadSavedContent: 'An auto-saved version of this content from "{0}" has been found. Would you like to compare content versions and choose which one to load?',
                          title: 'Compare auto-saved content with that loaded from the website',
                      Severity: Major
                      Found in ckeditor/plugins/autosave/lang/pt-br.js and 10 other locations - About 2 hrs to fix
                      ckeditor/plugins/autosave/lang/ca.js on lines 5..17
                      ckeditor/plugins/autosave/lang/cs.js on lines 5..17
                      ckeditor/plugins/autosave/lang/de.js on lines 5..17
                      ckeditor/plugins/autosave/lang/en.js on lines 5..17
                      ckeditor/plugins/autosave/lang/es.js on lines 5..17
                      ckeditor/plugins/autosave/lang/fr.js on lines 5..17
                      ckeditor/plugins/autosave/lang/ja.js on lines 5..17
                      ckeditor/plugins/autosave/lang/pl.js on lines 5..17
                      ckeditor/plugins/autosave/lang/zh-cn.js on lines 5..17
                      ckeditor/plugins/autosave/lang/zh.js on lines 5..17

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

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

                      (function ( $ ) {
                      
                          var localization = $.spectrum.localization["tr"] = {
                              cancelText: "iptal",
                              chooseText: "tamam"
                      Severity: Major
                      Found in scripts/spectrum/i18n/jquery.spectrum-tr.js and 6 other locations - About 2 hrs to fix
                      scripts/spectrum/i18n/jquery.spectrum-dk.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-fa.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-fi.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-ja.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-ru.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-sv.js on lines 5..14

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

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

                      (function ( $ ) {
                      
                          var localization = $.spectrum.localization["dk"] = {
                              cancelText: "annuller",
                              chooseText: "Vælg"
                      Severity: Major
                      Found in scripts/spectrum/i18n/jquery.spectrum-dk.js and 6 other locations - About 2 hrs to fix
                      scripts/spectrum/i18n/jquery.spectrum-fa.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-fi.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-ja.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-ru.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-sv.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-tr.js on lines 5..14

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

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

                      (function ( $ ) {
                      
                          var localization = $.spectrum.localization["ja"] = {
                              cancelText: "中止",
                              chooseText: "選択"
                      Severity: Major
                      Found in scripts/spectrum/i18n/jquery.spectrum-ja.js and 6 other locations - About 2 hrs to fix
                      scripts/spectrum/i18n/jquery.spectrum-dk.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-fa.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-fi.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-ru.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-sv.js on lines 5..14
                      scripts/spectrum/i18n/jquery.spectrum-tr.js on lines 5..14

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

                      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

                      Severity
                      Category
                      Status
                      Source
                      Language