laboiteproject/lenuage

View on GitHub

Showing 384 of 384 total issues

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

    }, {
      key: 'onInit',
      value: function onInit(value) {
        if (typeof value === 'undefined') {
          return this.options.onInit;
Severity: Major
Found in static/dist/js/site-70bd78197e.js and 1 other location - About 3 hrs to fix
static/dist/js/site-70bd78197e.js on lines 438..450

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

    }, {
      key: 'toggleReadonly',
      value: function toggleReadonly() {
        this.options.readonly = !this.options.readonly;
        this.$element.prop('readonly', this.options.readonly);
Severity: Major
Found in static/dist/js/site-70bd78197e.js and 1 other location - About 3 hrs to fix
static/dist/js/site-70bd78197e.js on lines 240..248

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

    }, {
      key: 'onSwitchChange',
      value: function onSwitchChange(value) {
        if (typeof value === 'undefined') {
          return this.options.onSwitchChange;
Severity: Major
Found in static/dist/js/site-70bd78197e.js and 1 other location - About 3 hrs to fix
static/dist/js/site-70bd78197e.js on lines 426..438

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

            send: function( headers, complete ) {
                var i,
                    xhr = options.xhr();

                xhr.open(
Severity: Major
Found in static/dist/js/site-70bd78197e.js - About 3 hrs to fix

    File views.py has 287 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # coding: utf-8
    import logging
    
    from django.apps import apps
    from django.contrib.messages.views import SuccessMessageMixin
    Severity: Minor
    Found in boites/views.py - About 2 hrs to fix

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

      function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
          var bySet = setMatchers.length > 0,
              byElement = elementMatchers.length > 0,
              superMatcher = function( seed, context, xml, results, outermost ) {
                  var elem, j, matcher,
      Severity: Major
      Found in static/dist/js/site-70bd78197e.js - About 2 hrs to fix

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

            function BootstrapSwitch(element) {
              var _this = this;
        
              var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
        
        
        Severity: Major
        Found in static/dist/js/site-70bd78197e.js - About 2 hrs to fix

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

              add: function( elem, types, handler, data, selector ) {
          
                  var handleObjIn, eventHandle, tmp,
                      events, t, handleObj,
                      special, handlers, type, namespaces, origType,
          Severity: Major
          Found in static/dist/js/site-70bd78197e.js - About 2 hrs to fix

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

                for model in apps.get_models():
                    if issubclass(model, App):
                        verbose_name = model._meta.verbose_name.title()
                        apps_list.append({'verbose_name': verbose_name[16:], 'pk': 'create', 'app_label': model._meta.app_label})
            Severity: Major
            Found in boites/views.py and 1 other location - About 2 hrs to fix
            laboite/views.py on lines 9..12

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

            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

            Severity: Major
            Found in laboite/apps/tasks/migrations/0005_auto_20171203_2307.py and 1 other location - About 2 hrs to fix
            laboite/apps/tasks/migrations/0004_auto_20171203_2306.py on lines 0..16

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

            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

                for model in apps.get_models():
                    if issubclass(model, App):
                        verbose_name = model._meta.verbose_name.title()
                        apps_list.append({'verbose_name': verbose_name[16:], 'pk': 'homepage', 'app_label': model._meta.app_label})
            Severity: Major
            Found in laboite/views.py and 1 other location - About 2 hrs to fix
            boites/views.py on lines 54..57

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

            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

            Severity: Major
            Found in laboite/apps/tasks/migrations/0004_auto_20171203_2306.py and 1 other location - About 2 hrs to fix
            laboite/apps/tasks/migrations/0005_auto_20171203_2307.py on lines 0..16

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

            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 done has 67 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/dist/js/site-70bd78197e.js - About 2 hrs to fix

              Consider simplifying this complex logical expression.
              Open

                                      if ( forward && useCache ) {
              
                                          // Seek `elem` from a previously-cached index
              
                                          // ...in a gzip-friendly way
              Severity: Critical
              Found in static/dist/js/site-70bd78197e.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/dist/js/site-70bd78197e.js - About 2 hrs to fix

                  Function superMatcher has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          superMatcher = function( seed, context, xml, results, outermost ) {
                              var elem, j, matcher,
                                  matchedCount = 0,
                                  i = "0",
                                  unmatched = seed && [],
                  Severity: Major
                  Found in static/dist/js/site-70bd78197e.js - About 2 hrs to fix

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

                        }, {
                          key: 'labelWidth',
                          value: function labelWidth(value) {
                            if (typeof value === 'undefined') {
                              return this.options.labelWidth;
                    Severity: Major
                    Found in static/dist/js/site-70bd78197e.js and 1 other location - About 2 hrs to fix
                    static/dist/js/site-70bd78197e.js on lines 372..383

                    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

                        }, {
                          key: 'handleWidth',
                          value: function handleWidth(value) {
                            if (typeof value === 'undefined') {
                              return this.options.handleWidth;
                    Severity: Major
                    Found in static/dist/js/site-70bd78197e.js and 1 other location - About 2 hrs to fix
                    static/dist/js/site-70bd78197e.js on lines 383..394

                    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 Deferred has 62 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" ],
                    Severity: Major
                    Found in static/dist/js/site-70bd78197e.js - About 2 hrs to fix

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

                          }, {
                            key: 'readonly',
                            value: function readonly(value) {
                              if (typeof value === 'undefined') {
                                return this.options.readonly;
                      Severity: Major
                      Found in static/dist/js/site-70bd78197e.js and 4 other locations - About 2 hrs to fix
                      static/dist/js/site-70bd78197e.js on lines 211..222
                      static/dist/js/site-70bd78197e.js on lines 229..240
                      static/dist/js/site-70bd78197e.js on lines 267..278
                      static/dist/js/site-70bd78197e.js on lines 287..298

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

                      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