bronycub/sugarcub

View on GitHub

Showing 3,238 of 3,238 total issues

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

                if (a.constructor !== b.constructor) {
                    // Allow objects with no prototype to be equivalent to
                    // objects with Object as their constructor.
                    if (!((getProto(a) === null && getProto(b) === Object.prototype) ||
                        (getProto(b) === null && getProto(a) === Object.prototype)))
core/static/vendor/jquery-expander/test/qunit/qunit.1.19.0.js on lines 1618..1626

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

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 ( tests ) {
        result = document.createElement( "p" );
        result.id = "qunit-testresult";
        result.className = "result";
        tests.parentNode.insertBefore( result, tests );
core/static/vendor/bootstrap-datepicker/tests/assets/qunit.js on lines 574..580

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

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

        event.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );
Severity: Major
Found in core/static/vendor/jquery-expander/test/jquery.1.11.3.js and 1 other location - About 1 hr to fix
core/static/vendor/jquery-expander/test/jquery.1.11.3.js on lines 4816..4816

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

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 ( a.constructor !== b.constructor ) {

                        // Allow objects with no prototype to be equivalent to
                        // objects with Object as their constructor.
                        if ( !( ( getProto( a ) === null && getProto( b ) === Object.prototype ) ||
core/static/vendor/bootstrap-datepicker/tests/assets/qunit.js on lines 1207..1215

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

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 ( tests ) {
            result = document.createElement( "p" );
            result.id = "qunit-testresult";
            result.className = "result";
            tests.parentNode.insertBefore( result, tests );
core/static/vendor/jquery-expander/test/qunit/qunit.1.19.0.js on lines 3205..3211

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

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

        event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
Severity: Major
Found in core/static/vendor/jquery-expander/test/jquery.1.11.3.js and 1 other location - About 1 hr to fix
core/static/vendor/jquery-expander/test/jquery.1.11.3.js on lines 4817..4817

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

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

    data: function( key, value ) {
        var i, name, data,
            elem = this[ 0 ],
            attrs = elem && elem.attributes;

Severity: Minor
Found in core/static/vendor/jquery/dist/jquery.js - About 1 hr to fix

    Function data has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        data: function( key, value ) {
            var i, name, data,
                elem = this[ 0 ],
                attrs = elem && elem.attributes;
    
    
    Severity: Minor
    Found in core/static/vendor/jquery/dist/jquery.slim.js - About 1 hr to fix

      Function data has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          data: function( key, value ) {
              var i, name, data,
                  elem = this[ 0 ],
                  attrs = elem && elem.attributes;
      
      
      Severity: Minor
      Found in core/static/vendor/jquery/src/data.js - About 1 hr to fix

        Function getClassNames has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                getClassNames: function(date){
                    var cls = [],
                        year = this.viewDate.getUTCFullYear(),
                        month = this.viewDate.getUTCMonth(),
                        today = new Date();

          Function extend has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          L.Class.extend = function (props) {
          
              // extended class with the new prototype
              var NewClass = function () {
          
          
          Severity: Minor
          Found in core/static/vendor/leaflet/dist/leaflet-src.js - About 1 hr to fix

            Function getClassNames has 44 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    getClassNames: function(date){
                        var cls = [],
                            year = this.viewDate.getUTCFullYear(),
                            month = this.viewDate.getUTCMonth(),
                            today = new Date();
            Severity: Minor
            Found in core/static/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js - About 1 hr to fix

              Function slide has 44 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                Carousel.prototype.slide = function (type, next) {
                  var $active   = this.$element.find('.item.active')
                  var $next     = next || this.getItemForDirection(type, $active)
                  var isCycling = this.interval
                  var direction = type == 'next' ? 'left' : 'right'
              Severity: Minor
              Found in core/static/vendor/bootstrap/js/carousel.js - About 1 hr to fix

                Function slide has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  Carousel.prototype.slide = function (type, next) {
                    var $active   = this.$element.find('.item.active')
                    var $next     = next || this.getItemForDirection(type, $active)
                    var isCycling = this.interval
                    var direction = type == 'next' ? 'left' : 'right'
                Severity: Minor
                Found in core/static/vendor/bootstrap/dist/js/bootstrap.js - About 1 hr to fix

                  Function participate has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def participate(request):
                  
                      if request.method == 'POST':
                          captcha = ParticipationForm(request.POST)
                          if request.user.is_authenticated():
                  Severity: Minor
                  Found in agenda/views.py - About 1 hr 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

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

                  jQuery.ajaxPrefilter( "script", function( s ) {
                      if ( s.cache === undefined ) {
                          s.cache = false;
                      }
                      if ( s.crossDomain ) {
                  Severity: Major
                  Found in core/static/vendor/jquery/src/ajax/script.js and 1 other location - About 1 hr to fix
                  core/static/vendor/jquery/dist/jquery.js on lines 9583..9590

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

                  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

                  jQuery.ajaxPrefilter( "script", function( s ) {
                      if ( s.cache === undefined ) {
                          s.cache = false;
                      }
                      if ( s.crossDomain ) {
                  Severity: Major
                  Found in core/static/vendor/jquery/dist/jquery.js and 1 other location - About 1 hr to fix
                  core/static/vendor/jquery/src/ajax/script.js on lines 34..41

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

                  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

                                  L: function () {
                                      var Y = fmt.Y();
                                      return (Y % 4 === 0 && Y % 100 !== 0 || Y % 400 === 0) ? 1 : 0;
                                  },
                  core/static/vendor/datetimepicker/build/jquery.datetimepicker.full.js on lines 368..371

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

                  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

                                  L: function () {
                                      var Y = fmt.Y();
                                      return (Y % 4 === 0 && Y % 100 !== 0 || Y % 400 === 0) ? 1 : 0;
                                  },
                  core/static/vendor/php-date-formatter/js/php-date-formatter.js on lines 407..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 70.

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

                      _updateStyle: function () {
                          var stroke = this._stroke,
                              fill = this._fill,
                              options = this.options,
                              container = this._container;
                  Severity: Minor
                  Found in core/static/vendor/leaflet/dist/leaflet-src.js - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language