wbrefvem/corkboard

View on GitHub

Showing 212 of 212 total issues

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

var LITHUANIAN_MAP = {
    'ą':'a', 'č':'c', 'ę':'e', 'ė':'e', 'į':'i', 'š':'s', 'ų':'u', 'ū':'u',
    'ž':'z',
    'Ą':'A', 'Č':'C', 'Ę':'E', 'Ė':'E', 'Į':'I', 'Š':'S', 'Ų':'U', 'Ū':'U',
    'Ž':'Z'
Severity: Major
Found in static/admin/js/urlify.js and 2 other locations - About 3 hrs to fix
static/admin/js/urlify.js on lines 46..50
static/admin/js/urlify.js on lines 51..55

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

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

var CZECH_MAP = {
    'č':'c', 'ď':'d', 'ě':'e', 'ň': 'n', 'ř':'r', 'š':'s', 'ť':'t', 'ů':'u',
    'ž':'z', 'Č':'C', 'Ď':'D', 'Ě':'E', 'Ň': 'N', 'Ř':'R', 'Š':'S', 'Ť':'T',
    'Ů':'U', 'Ž':'Z'
};
Severity: Major
Found in static/admin/js/urlify.js and 2 other locations - About 3 hrs to fix
static/admin/js/urlify.js on lines 51..55
static/admin/js/urlify.js on lines 67..72

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

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

var POLISH_MAP = {
    'ą':'a', 'ć':'c', 'ę':'e', 'ł':'l', 'ń':'n', 'ó':'o', 'ś':'s', 'ź':'z',
    'ż':'z', 'Ą':'A', 'Ć':'C', 'Ę':'E', 'Ł':'L', 'Ń':'N', 'Ó':'O', 'Ś':'S',
    'Ź':'Z', 'Ż':'Z'
};
Severity: Major
Found in static/admin/js/urlify.js and 2 other locations - About 3 hrs to fix
static/admin/js/urlify.js on lines 46..50
static/admin/js/urlify.js on lines 67..72

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

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

function Sizzle( selector, context, results, seed ) {
    var match, elem, m, nodeType,
        // QSA vars
        i, groups, old, nid, newContext, newSelector;

Severity: Major
Found in static/admin/js/jquery.js - About 3 hrs to fix

    Function buildFragment has 74 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        buildFragment: function( elems, context, scripts, selection ) {
            var j, elem, contains,
                tmp, tag, tbody, wrap,
                l = elems.length,
    
    
    Severity: Major
    Found in static/admin/js/jquery.js - About 2 hrs to fix

      Function matcherFromGroupMatchers has 71 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
          // A counter to specify which element is currently being matched
          var matcherCachedRuns = 0,
              bySet = setMatchers.length > 0,
              byElement = elementMatchers.length > 0,
      Severity: Major
      Found in static/admin/js/jquery.js - About 2 hrs to fix

        Function add has 70 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            add: function( elem, types, handler, data, selector ) {
                var tmp, events, t, handleObjIn,
                    special, eventHandle, handleObj,
                    handlers, type, namespaces, origType,
                    elemData = jQuery._data( elem );
        Severity: Major
        Found in static/admin/js/jquery.js - About 2 hrs to fix

          Function domManip has 70 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              domManip: function( args, table, callback ) {
          
                  // Flatten any nested arrays
                  args = core_concat.apply( [], args );
          
          
          Severity: Major
          Found in static/admin/js/jquery.js - About 2 hrs to fix

            Function done has 68 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    function done( status, nativeStatusText, responses, headers ) {
                        var isSuccess, success, error, response, modified,
                            statusText = nativeStatusText;
            
                        // Called once
            Severity: Major
            Found in static/admin/js/jquery.js - About 2 hrs to fix

              Function init has 66 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  init: function(field_id, field_name, is_stacked, admin_static_prefix) {
                      if (field_id.match(/__prefix__/)){
                          // Don't initialize on empty forms.
                          return;
                      }
              Severity: Major
              Found in static/admin/js/SelectFilter2.js - About 2 hrs to fix

                Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
                    if ( postFilter && !postFilter[ expando ] ) {
                        postFilter = setMatcher( postFilter );
                    }
                    if ( postFinder && !postFinder[ expando ] ) {
                Severity: Major
                Found in static/admin/js/jquery.js - About 2 hrs to fix

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

                          if (getStyle(document.body,'direction')!='rtl') {
                              cal_box.style.left = findPosX(cal_link) + 17 + 'px';
                          }
                          else {
                              // since style's width is in em, it'd be tough to calculate
                  Severity: Major
                  Found in static/admin/js/admin/DateTimeShortcuts.js and 1 other location - About 2 hrs to fix
                  static/admin/js/admin/DateTimeShortcuts.js on lines 171..180

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

                  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 (getStyle(document.body,'direction')!='rtl') {
                              clock_box.style.left = findPosX(clock_link) + 17 + 'px';
                          }
                          else {
                              // since style's width is in em, it'd be tough to calculate
                  Severity: Major
                  Found in static/admin/js/admin/DateTimeShortcuts.js and 1 other location - About 2 hrs to fix
                  static/admin/js/admin/DateTimeShortcuts.js on lines 304..313

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

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

                          superMatcher = function( seed, context, xml, results, expandContext ) {
                              var elem, j, matcher,
                                  setMatched = [],
                                  matchedCount = 0,
                                  i = "0",
                  Severity: Major
                  Found in static/admin/js/jquery.js - About 2 hrs to fix

                    Function Deferred has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        Deferred: function( func ) {
                            var tuples = [
                                    // action, add listener, listener list, final state
                                    [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
                                    [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
                    Severity: Major
                    Found in static/admin/js/jquery.js - About 2 hrs to fix

                      Function CHILD has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              "CHILD": function( type, what, argument, first, last ) {
                                  var simple = type.slice( 0, 3 ) !== "nth",
                                      forward = type.slice( -4 ) !== "last",
                                      ofType = what === "of-type";
                      
                      
                      Severity: Major
                      Found in static/admin/js/jquery.js - About 2 hrs to fix

                        Consider simplifying this complex logical expression.
                        Open

                                                if ( forward && useCache ) {
                                                    // Seek `elem` from a previously-cached index
                                                    outerCache = parent[ expando ] || (parent[ expando ] = {});
                                                    cache = outerCache[ type ] || [];
                                                    nodeIndex = cache[0] === dirruns && cache[1];
                        Severity: Critical
                        Found in static/admin/js/jquery.js - About 2 hrs to fix

                          Function init has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              init: function( selector, context, rootjQuery ) {
                                  var match, elem;
                          
                                  // HANDLE: $(""), $(null), $(undefined), $(false)
                                  if ( !selector ) {
                          Severity: Major
                          Found in static/admin/js/jquery.js - About 2 hrs to fix

                            File DateTimeShortcuts.js has 263 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            // Inserts shortcut buttons after all of the following:
                            //     <input type="text" class="vDateField">
                            //     <input type="text" class="vTimeField">
                            
                            var DateTimeShortcuts = {
                            Severity: Minor
                            Found in static/admin/js/admin/DateTimeShortcuts.js - About 2 hrs to fix

                              Function stackedFormset has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                $.fn.stackedFormset = function(options) {
                                  var $rows = $(this);
                                  var updateInlineLabel = function(row) {
                                    $($rows.selector).find(".inline_label").each(function(i) {
                                      var count = i + 1;
                              Severity: Major
                              Found in static/admin/js/inlines.js - About 2 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language