laboiteproject/lenuage

View on GitHub

Showing 384 of 384 total issues

Function 15 has 6373 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{}],15:[function(require,module,exports){
/*!
 * jQuery JavaScript Library v2.2.4
 * http://jquery.com/
 *
Severity: Major
Found in static/dist/js/site-70bd78197e.js - About 1 mo to fix

    File site-70bd78197e.js has 8731 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
    /**
      * bootstrap-switch - Turn checkboxes and radio buttons into toggle switches.
      *
      * @version v3.3.4
    Severity: Major
    Found in static/dist/js/site-70bd78197e.js - About 3 wks to fix

      Function Sizzle has 1387 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      (function( window ) {
      
      var i,
          support,
          Expr,
      Severity: Major
      Found in static/dist/js/site-70bd78197e.js - About 6 days to fix

        Function 13 has a Cognitive Complexity of 277 (exceeds 5 allowed). Consider refactoring.
        Open

        },{}],13:[function(require,module,exports){
        /* ========================================================================
         * Bootstrap: tooltip.js v3.3.7
         * http://getbootstrap.com/javascript/#tooltip
         * Inspired by the original jQuery.tipsy by Jason Frame
        Severity: Minor
        Found in static/dist/js/site-70bd78197e.js - About 5 days 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

        Function 1 has 735 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
        /**
          * bootstrap-switch - Turn checkboxes and radio buttons into toggle switches.
          *
          * @version v3.3.4
        Severity: Major
        Found in static/dist/js/site-70bd78197e.js - About 3 days to fix

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

            var BootstrapSwitch = function () {
              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 3 days to fix

            File font.js has 897 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            var font = [
                [
                    0,0,0,0,0,
                    0,0,0,0,0,
                    0,0,0,0,0,
            Severity: Major
            Found in laboite/static/js/font.js - About 2 days to fix

              Function 13 has 380 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              },{}],13:[function(require,module,exports){
              /* ========================================================================
               * Bootstrap: tooltip.js v3.3.7
               * http://getbootstrap.com/javascript/#tooltip
               * Inspired by the original jQuery.tipsy by Jason Frame
              Severity: Major
              Found in static/dist/js/site-70bd78197e.js - About 1 day to fix

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

                @pytest.mark.django_db
                def test_station_infos_ok_velib(app, requests_mocker, settings):
                    app.provider = 'velib'
                    app.save()
                    with requests_mocker as m:
                Severity: Major
                Found in laboite/apps/bikes/tests.py and 1 other location - About 1 day to fix
                laboite/apps/bikes/tests.py on lines 61..90

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

                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

                @pytest.mark.django_db
                def test_station_infos_ok_star(app, requests_mocker, settings):
                    app.provider = 'star'
                    app.save()
                    with requests_mocker as m:
                Severity: Major
                Found in laboite/apps/bikes/tests.py and 1 other location - About 1 day to fix
                laboite/apps/bikes/tests.py on lines 116..145

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

                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 3 has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring.
                Open

                },{"../../js/affix.js":3,"../../js/alert.js":4,"../../js/button.js":5,"../../js/carousel.js":6,"../../js/collapse.js":7,"../../js/dropdown.js":8,"../../js/modal.js":9,"../../js/popover.js":10,"../../js/scrollspy.js":11,"../../js/tab.js":12,"../../js/tooltip.js":13,"../../js/transition.js":14}],3:[function(require,module,exports){
                /* ========================================================================
                 * Bootstrap: affix.js v3.3.7
                 * http://getbootstrap.com/javascript/#affix
                 * ========================================================================
                Severity: Minor
                Found in static/dist/js/site-70bd78197e.js - About 1 day 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

                Function 6 has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
                Open

                },{}],6:[function(require,module,exports){
                /* ========================================================================
                 * Bootstrap: carousel.js v3.3.7
                 * http://getbootstrap.com/javascript/#carousel
                 * ========================================================================
                Severity: Minor
                Found in static/dist/js/site-70bd78197e.js - About 1 day 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

                Function 9 has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring.
                Open

                },{}],9:[function(require,module,exports){
                /* ========================================================================
                 * Bootstrap: modal.js v3.3.7
                 * http://getbootstrap.com/javascript/#modals
                 * ========================================================================
                Severity: Minor
                Found in static/dist/js/site-70bd78197e.js - About 1 day 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

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

                    @classmethod
                    def get_station_infos(cls, station_id):
                        req = requests.get(settings.STAR_API_BASE_URL,
                                           params={'apikey': settings.STAR_API_KEY,
                                                   'dataset': 'vls-stations-etat-tr',
                Severity: Major
                Found in laboite/apps/bikes/providers/star.py and 1 other location - About 1 day to fix
                laboite/apps/bikes/providers/velib.py on lines 36..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 156.

                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

                    @classmethod
                    def get_station_infos(cls, station_id):
                        req = requests.get(settings.VELIB_API_BASE_URL,
                                           params={'apikey': settings.VELIB_API_KEY,
                                                   'dataset': 'stations-velib-disponibilites-en-temps-reel',
                Severity: Major
                Found in laboite/apps/bikes/providers/velib.py and 1 other location - About 1 day to fix
                laboite/apps/bikes/providers/star.py on lines 35..54

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

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

                    ajax: function( url, options ) {
                
                        // If url is an object, simulate pre-1.5 signature
                        if ( typeof url === "object" ) {
                            options = url;
                Severity: Major
                Found in static/dist/js/site-70bd78197e.js - About 1 day to fix

                  Function 9 has 247 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  },{}],9:[function(require,module,exports){
                  /* ========================================================================
                   * Bootstrap: modal.js v3.3.7
                   * http://getbootstrap.com/javascript/#modals
                   * ========================================================================
                  Severity: Major
                  Found in static/dist/js/site-70bd78197e.js - About 1 day to fix

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

                    def test_data_ok_one_bus(app, mocker, requests_mocker, settings):
                        assert app.should_update() is True
                        now = timezone.now()
                        now = now.replace(year=2017, month=7, day=22, hour=20, minute=19, second=10)
                    
                    
                    Severity: Major
                    Found in laboite/apps/bus/tests.py and 1 other location - About 1 day to fix
                    laboite/apps/bus/tests.py on lines 37..62

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

                    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

                    def test_data_ok(app, mocker, requests_mocker, settings):
                        assert app.should_update() is True
                        now = timezone.now()
                        now = now.replace(year=2017, month=7, day=22, hour=20, minute=19, second=10)
                    
                    
                    Severity: Major
                    Found in laboite/apps/bus/tests.py and 1 other location - About 1 day to fix
                    laboite/apps/bus/tests.py on lines 65..90

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

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

                    setDocument = Sizzle.setDocument = function( node ) {
                        var hasCompare, parent,
                            doc = node ? node.ownerDocument || node : preferredDoc;
                    
                        // Return early if doc is invalid or already selected
                    Severity: Major
                    Found in static/dist/js/site-70bd78197e.js - About 1 day to fix
                      Severity
                      Category
                      Status
                      Source
                      Language