ZuluPro/myblog

View on GitHub

Showing 163 of 163 total issues

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

      S(this.scope).off('.offcanvas')
        .on('click.fndtn.offcanvas', '.left-off-canvas-toggle', function (e) {
          self.click_toggle_class(e, move_class + right_postfix);
        })
        .on('click.fndtn.offcanvas', '.left-off-canvas-menu a', function (e) {
myblog/myapp/static/zinnia/js/foundation/foundation.offcanvas.js on lines 33..51

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

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

    toggle_active_tab: function (tab, location_hash) {
      var S = this.S,
          tabs = tab.closest('[' + this.attr_name() + ']'),
          anchor = tab.children('a').first(),
          target_hash = '#' + anchor.attr('href').split('#')[1],
Severity: Minor
Found in myblog/myapp/static/zinnia/js/foundation/foundation.tab.js - About 1 hr to fix

    Function events has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        events : function () {
          var self = this,
              S = self.S,
              move_class = '',
              right_postfix = '',
    Severity: Minor
    Found in myblog/myapp/static/zinnia/js/foundation/foundation.offcanvas.js - About 1 hr to fix

      Function events has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          events : function () {
            var self = this;
            var S = this.S;
            S(this.scope)
            .off('.fndtn.accordion')
      Severity: Minor
      Found in myblog/myapp/static/zinnia/js/foundation/foundation.accordion.js - About 1 hr to fix

        Function start has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            start : function () {
              var self = this,
                  $this = $('[' + this.attr_name() + ']', this.scope),
                  integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'],
                  int_settings_count = integer_settings.length;
        Severity: Minor
        Found in myblog/myapp/static/zinnia/js/foundation/foundation.joyride.js - About 1 hr to fix

          Function resize has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              resize : function () {
                var self = this;
                self.S('[' + this.attr_name() + ']').each(function () {
                  var topbar = self.S(this),
                      settings = topbar.data(self.attr_name(true) + '-init');
          Severity: Minor
          Found in myblog/myapp/static/zinnia/js/foundation/foundation.topbar.js - About 1 hr to fix

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

                show: function(class_name, $off_canvas) {
                  $off_canvas = $off_canvas || this.get_wrapper();
                  $off_canvas.trigger('open').trigger('open.fndtn.offcanvas');
                  $off_canvas.addClass(class_name);
                },
            myblog/myapp/static/zinnia/js/foundation/foundation.offcanvas.js on lines 74..78

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

            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

                hide: function(class_name, $off_canvas) {
                  $off_canvas = $off_canvas || this.get_wrapper();
                  $off_canvas.trigger('close').trigger('close.fndtn.offcanvas');
                  $off_canvas.removeClass(class_name);
                },
            myblog/myapp/static/zinnia/js/foundation/foundation.offcanvas.js on lines 68..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 60.

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

                self.build_markup = function() {
                  slides_container.wrap('<div class="'+settings.container_class+'"></div>');
                  container = slides_container.parent();
                  slides_container.addClass(settings.slides_container_class);
            
            
            Severity: Minor
            Found in myblog/myapp/static/zinnia/js/foundation/foundation.orbit.js - About 1 hr to fix

              Function events has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  events : function () {
                    var self = this,
                        S = self.S,
                        settings = self.settings;
              
              
              Severity: Minor
              Found in myblog/myapp/static/zinnia/js/foundation/foundation.magellan.js - About 1 hr to fix

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

                    init : function (section, method, options) {
                      Foundation.inherit(this, 'add_custom_rule register_media throttle');
                      var self = this;
                
                      self.register_media('topbar', 'foundation-mq-topbar');
                Severity: Minor
                Found in myblog/myapp/static/zinnia/js/foundation/foundation.topbar.js - About 1 hr to fix

                  Function shift has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      shift : function (current, target, callback) {
                        var clearing = target.parent(),
                            old_index = this.settings.prev_index || target.index(),
                            direction = this.direction(clearing, current, target),
                            dir = this.rtl ? 'right' : 'left',
                  Severity: Minor
                  Found in myblog/myapp/static/zinnia/js/foundation/foundation.clearing.js - About 1 hr to fix

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

                        def test_tinymce_prism_plugin_form(self):
                            url = reverse('tinymce-prism-form')
                            res = self.client.get(url)
                            self.assertEqual(res.status_code, 200)
                    Severity: Major
                    Found in myblog/myapp/tests.py and 1 other location - About 1 hr to fix
                    myblog/about/tests.py on lines 10..13

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

                    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_view(self):
                            url = reverse('aboutme')
                            res = self.client.get(url)
                            self.assertEqual(res.status_code, 200)
                    Severity: Major
                    Found in myblog/about/tests.py and 1 other location - About 1 hr to fix
                    myblog/myapp/tests.py on lines 35..38

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

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

                        pos_phone : function (init) {
                          var tip_height = this.settings.$next_tip.outerHeight(),
                              tip_offset = this.settings.$next_tip.offset(),
                              target_height = this.settings.$target.outerHeight(),
                              $nub = $('.joyride-nub', this.settings.$next_tip),
                    Severity: Minor
                    Found in myblog/myapp/static/zinnia/js/foundation/foundation.joyride.js - About 1 hr to fix

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

                                      left: this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth()});
                      myblog/myapp/static/zinnia/js/foundation/foundation.joyride.js on lines 474..474

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

                      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

                                      left: this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth() + leftAdjustment});
                      myblog/myapp/static/zinnia/js/foundation/foundation.joyride.js on lines 487..487

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

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

                          center_and_label : function (target, label) {
                            if (!this.rtl) {
                              target.css({
                                marginLeft : -(target.outerWidth() / 2),
                                marginTop : -(target.outerHeight() / 2)
                      Severity: Minor
                      Found in myblog/myapp/static/zinnia/js/foundation/foundation.clearing.js - About 1 hr to fix

                        Function set_ui has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            set_ui : function($handle, value) {
                              var settings = $.data($handle[0], 'settings'),
                                  handle_l = $.data($handle[0], 'handle_l'),
                                  bar_l = $.data($handle[0], 'bar_l'),
                                  norm_pct = this.normalized_percentage(value, settings.start, settings.end),
                        Severity: Minor
                        Found in myblog/myapp/static/zinnia/js/foundation/foundation.slider.js - About 1 hr to fix

                          Function equalize has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              equalize: function(equalizer) {
                                var isStacked = false,
                                    vals = equalizer.find('[' + this.attr_name() + '-watch]:visible'),
                                    settings = equalizer.data(this.attr_name(true)+'-init');
                          
                          
                          Severity: Minor
                          Found in myblog/myapp/static/zinnia/js/foundation/foundation.equalizer.js - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language