CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

  $(window).on('load.bs.scrollspy.data-api', function () {
    $('[data-spy="scroll"]').each(function () {
      var $spy = $(this)
      Plugin.call($spy, $spy.data())
    })
Severity: Major
Found in Web.Admin/Content/bootstrap/js/bootstrap.js and 1 other location - About 1 hr to fix
Web.Admin/Content/bootstrap/js/bootstrap.js on lines 524..529

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

            if (v) {
                delete st['margin'];
                st['margin-top'] = v + 'px';
                st['margin-bottom'] = v + 'px';
            } else {
Web.Admin/2014/wordpress/wp-includes/js/tinymce/themes/advanced/js/image.js on lines 142..149

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

  var options = Object.extend({
    direction: 'center',
    moveTransition: Effect.Transitions.sinoidal,
    scaleTransition: Effect.Transitions.sinoidal,
    opacityTransition: Effect.Transitions.full
Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/effects.js on lines 828..833

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

    Camera.publish = function (el, options, callback){
        if( typeof options == 'function' ){
            callback = options;
            options = {};
        }
Severity: Minor
Found in Web.Admin/z-scripts/FileAPI.js - About 1 hr to fix

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

                    (function _addFile(file/**Object*/){
                        if( file.image ){ // This is a FileAPI.Image
                            queue.inc();
    
                            file.toData(function (err, image){
    Severity: Minor
    Found in Web.Admin/z-scripts/FileAPI.js - About 1 hr to fix

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

                  onThumbLoad = function( thumb, callback ) {
      
                      // scale when ready
                      thumb.scale({
                          width:    thumb.data.width,
      Severity: Minor
      Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 1 hr to fix

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

                        function PageViewPerformance(name, url, durationMs, properties, measurements) {
                            _super.call(this);
                            this.aiDataContract = {
                                ver: true,
                                name: false,
        Severity: Minor
        Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 hr to fix

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

                      onload = (function( self, callback, src ) {
          
                          return function() {
          
                              var complete = function() {
          Severity: Minor
          Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 1 hr to fix

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

                var historyController = function (dataService) {
                    var vm = this;
                    
                    vm.History = [
                        { year: 2019, province: 'QC', city: 'Gatineau' },
            Severity: Minor
            Found in Web.Admin/ClientApp/Controllers/controller.history.js - About 1 hr to fix

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

              function PopupWindow_showPopup(anchorname) {
                  this.getXYPosition(anchorname);
                  this.x += this.offsetX;
                  this.y += this.offsetY;
                  if (!this.populated && (this.contents != "")) {
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/js/colorpicker.dev.js - About 1 hr to fix

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

                jQuery.attr = function( elem, name, value, pass ) {
                    var lowerName = name.toLowerCase(),
                        nType = elem && elem.nodeType;
                
                    if ( pass ) {
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/js/jquery/jquery-migrate.js - About 1 hr to fix

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

                          set: function( selector, views, options ) {
                              var existing, next;
                  
                              if ( ! _.isString( selector ) ) {
                                  options  = views;
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/js/wp-backbone.js - About 1 hr to fix

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

                        function htmlToData(html) {
                            var data = {};
                    
                            new tinymce.html.SaxParser({
                                validate: false,

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

                              createCropToolbar: function() {
                                  var canSkipCrop, toolbarOptions;
                      
                                  canSkipCrop = this.get('canSkipCrop') || false;
                      
                      
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js - About 1 hr to fix

                        Method delete_theme has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function delete_theme($template) {
                            global $wp_filesystem;
                        
                            if ( empty($template) )
                                return false;
                        Severity: Minor
                        Found in Web.Admin/2014/wordpress/wp-admin/includes/theme.php - About 1 hr to fix

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

                                      onThumbLoad = function( thumb, callback ) {
                          
                                          // scale when ready
                                          thumb.scale({
                                              width:    thumb.data.width,
                          Severity: Minor
                          Found in Web.Admin/Content/galleria/galleria-1.4.2.js - About 1 hr to fix

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

                                        onload = (function( self, callback, src ) {
                            
                                            return function() {
                            
                                                var complete = function() {
                            Severity: Minor
                            Found in Web.Admin/Content/galleria/galleria-1.4.2.js - About 1 hr to fix

                              Method wp_save_nav_menu_items has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function wp_save_nav_menu_items( $menu_id = 0, $menu_data = array() ) {
                                  $menu_id = (int) $menu_id;
                                  $items_saved = array();
                              
                                  if ( 0 == $menu_id || is_nav_menu( $menu_id ) ) {
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-admin/includes/nav-menu.php - About 1 hr to fix

                                Method compression_test has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function compression_test() {
                                ?>
                                    <script type="text/javascript">
                                    /* <![CDATA[ */
                                    var testCompression = {
                                Severity: Minor
                                Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php - About 1 hr to fix

                                  Method wp_get_revision_ui_diff has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {
                                      if ( ! $post = get_post( $post ) )
                                          return false;
                                  
                                      if ( $compare_from ) {
                                  Severity: Minor
                                  Found in Web.Admin/2014/wordpress/wp-admin/includes/revision.php - About 1 hr to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language