Pi2-FGABreja/FGABrejaWeb

View on GitHub

Showing 290 of 290 total issues

Consider simplifying this complex logical expression.
Open

    if ( !options || !options.nav ) if (
        /* 1 */ ( !isFlippedBase && calendar.disabled( dateObject ) ) ||
        /* 2 */ ( isFlippedBase && calendar.disabled( dateObject ) && ( hasEnabledWeekdays || hasEnabledBeforeTarget || hasEnabledAfterTarget ) ) ||
        /* 3 */ ( !isFlippedBase && (dateObject.pick <= minLimitObject.pick || dateObject.pick >= maxLimitObject.pick) )
    ) {
Severity: Critical
Found in FGABreja/static/js/bin/materialize.js - About 2 hrs to fix

    Consider simplifying this complex logical expression.
    Open

        if ( !options || !options.nav ) if (
            /* 1 */ ( !isFlippedBase && calendar.disabled( dateObject ) ) ||
            /* 2 */ ( isFlippedBase && calendar.disabled( dateObject ) && ( hasEnabledWeekdays || hasEnabledBeforeTarget || hasEnabledAfterTarget ) ) ||
            /* 3 */ ( !isFlippedBase && (dateObject.pick <= minLimitObject.pick || dateObject.pick >= maxLimitObject.pick) )
        ) {
    Severity: Critical
    Found in FGABreja/static/js/date_picker/picker.date.js - About 2 hrs to fix

      Function validate has 50 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      DatePicker.prototype.validate = function( type, dateObject, options ) {
      
          var calendar = this,
      
              // Keep a reference to the original date.
      Severity: Minor
      Found in FGABreja/static/js/date_picker/picker.date.js - About 2 hrs to fix

        Function validate has 50 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        DatePicker.prototype.validate = function( type, dateObject, options ) {
        
            var calendar = this,
        
                // Keep a reference to the original date.
        Severity: Minor
        Found in FGABreja/static/js/bin/materialize.js - About 2 hrs to fix

          Function item has 49 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                          item: function( rowCounter ) {
          
                              // If Monday is the first day and the month starts on Sunday, shift the date back a week.
                              var shiftDateBy = settings.firstDay && calendar.create([ viewsetObject.year, viewsetObject.month, 1 ]).day === 0 ? -7 : 0
          
          
          Severity: Minor
          Found in FGABreja/static/js/date_picker/picker.date.js - About 1 hr to fix

            Function item has 49 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                            item: function( rowCounter ) {
            
                                // If Monday is the first day and the month starts on Sunday, shift the date back a week.
                                var shiftDateBy = settings.firstDay && calendar.create([ viewsetObject.year, viewsetObject.month, 1 ]).day === 0 ? -7 : 0
            
            
            Severity: Minor
            Found in FGABreja/static/js/bin/materialize.js - About 1 hr to fix

              Function placeDropdown has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function placeDropdown() {
                    // Check html data attributes
                    updateOptions();
              
                    // Set Dropdown state
              Severity: Minor
              Found in FGABreja/static/js/dropdown.js - About 1 hr to fix

                Function placeDropdown has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function placeDropdown() {
                      // Check html data attributes
                      updateOptions();
                
                      // Set Dropdown state
                Severity: Minor
                Found in FGABreja/static/js/bin/materialize.js - About 1 hr to fix

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

                      def test_get(self):
                          response = self.client.get(reverse('register_user'))
                          self.assertEquals(response.status_code, 200)
                          self.assertTemplateUsed(response, template_name='register.html')
                  Severity: Major
                  Found in FGABreja/authentication/tests/test_views.py and 1 other location - About 1 hr to fix
                  FGABreja/authentication/tests/test_views.py on lines 16..19

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

                  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_get(self):
                          response = self.client.get(reverse('login'))
                          self.assertEquals(response.status_code, 200)
                          self.assertTemplateUsed(response, template_name='login.html')
                  Severity: Major
                  Found in FGABreja/authentication/tests/test_views.py and 1 other location - About 1 hr to fix
                  FGABreja/authentication/tests/test_views.py on lines 133..136

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

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

                              open: function( dontGiveFocus ) {
                  
                                  // If it’s already open, do nothing.
                                  if ( STATE.open ) return P
                  
                  
                  Severity: Minor
                  Found in FGABreja/static/js/bin/materialize.js - About 1 hr to fix

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

                                open: function( dontGiveFocus ) {
                    
                                    // If it’s already open, do nothing.
                                    if ( STATE.open ) return P
                    
                    
                    Severity: Minor
                    Found in FGABreja/static/js/date_picker/picker.js - About 1 hr to fix

                      Function defaults has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      DatePicker.defaults = (function( prefix ) {
                      
                          return {
                      
                              // The title label to use for the month nav buttons
                      Severity: Minor
                      Found in FGABreja/static/js/bin/materialize.js - About 1 hr to fix

                        Function defaults has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        DatePicker.defaults = (function( prefix ) {
                        
                            return {
                        
                                // The title label to use for the month nav buttons
                        Severity: Minor
                        Found in FGABreja/static/js/date_picker/picker.date.js - About 1 hr to fix

                          Function parallax has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              $.fn.parallax = function () {
                                var window_width = $(window).width();
                                // Parallax Scripts
                                return this.each(function(i) {
                                  var $this = $(this);
                          Severity: Minor
                          Found in FGABreja/static/js/parallax.js - About 1 hr to fix

                            Function closeModal has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                closeModal: function(options) {
                                  var defaults = {
                                    out_duration: 250,
                                    complete: undefined
                                  },
                            Severity: Minor
                            Found in FGABreja/static/js/bin/materialize.js - About 1 hr to fix

                              Function parallax has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  $.fn.parallax = function () {
                                    var window_width = $(window).width();
                                    // Parallax Scripts
                                    return this.each(function(i) {
                                      var $this = $(this);
                              Severity: Minor
                              Found in FGABreja/static/js/bin/materialize.js - About 1 hr to fix

                                Function closeModal has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    closeModal: function(options) {
                                      var defaults = {
                                        out_duration: 250,
                                        complete: undefined
                                      },
                                Severity: Minor
                                Found in FGABreja/static/js/leanModal.js - About 1 hr to fix

                                  Function hide has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          hide: function(e) {
                                              TouchHandler.touchup(e);
                                  
                                              var el = this;
                                              var width = el.clientWidth * 1.4;
                                  Severity: Minor
                                  Found in FGABreja/static/js/bin/materialize.js - About 1 hr to fix

                                    Function hide has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            hide: function(e) {
                                                TouchHandler.touchup(e);
                                    
                                                var el = this;
                                                var width = el.clientWidth * 1.4;
                                    Severity: Minor
                                    Found in FGABreja/static/js/waves.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language