shadowproject/shadow

View on GitHub

Showing 126 of 126 total issues

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

elif cmd == "sendmany":
    try:
        frm = raw_input("From: ")
        to = raw_input("To (in format address1:amount1,address2:amount2,...): ")
        mc = raw_input("Minimum confirmations (optional): ")
Severity: Major
Found in contrib/bitrpc/bitrpc.py and 1 other location - About 3 hrs to fix
contrib/bitrpc/bitrpc.py on lines 251..262

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

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

    _initSnap: function () {
        this.currentPage = {};

        if ( typeof this.options.snap == 'string' ) {
            this.options.snap = this.scroller.querySelectorAll(this.options.snap);
Severity: Major
Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 3 hrs to fix

    Function _initIndicators has 82 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _initIndicators: function () {
            var interactive = this.options.interactiveScrollbars,
                customStyle = typeof this.options.scrollbars != 'string',
                indicators = [],
                indicator;
    Severity: Major
    Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 3 hrs to fix

      Function update has 82 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        Md5.prototype.update = function (message) {
          if (this.finalized) {
            return;
          }
          var notString = typeof(message) != 'string';
      Severity: Major
      Found in src/qt/res/assets/plugins/md5/md5.js - About 3 hrs to fix

        Function _key has 74 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _key: function (e) {
                if ( !this.enabled ) {
                    return;
                }
        
        
        Severity: Major
        Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 2 hrs to fix

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

                  p.createNavigation = function (ft, tbody) {
          
                      var $nav = $(ft.table).find(ft.pageInfo.pageNavigation);
                      //if we cannot find the navigation control within the table, then try find it outside
                      if ($nav.length === 0) {
          Severity: Major
          Found in src/qt/res/assets/plugins/footable/footable.paginate.js - About 2 hrs to fix

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

                _wheel: function (e) {
                    if ( !this.enabled ) {
                        return;
                    }
            
            
            Severity: Major
            Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 2 hrs to fix

              File bitrpc.py has 283 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              from jsonrpc import ServiceProxy
              import sys
              import string
              
              # ===== BEGIN USER SETTINGS =====
              Severity: Minor
              Found in contrib/bitrpc/bitrpc.py - About 2 hrs to fix

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

                    _move: function (e) {
                        if ( !this.enabled || utils.eventType[e.type] !== this.initiated ) {
                            return;
                        }
                
                
                Severity: Major
                Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 2 hrs to fix

                  Function refresh has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      refresh: function () {
                          this.transitionTime();
                  
                          if ( this.options.listenX && !this.options.listenY ) {
                              this.indicatorStyle.display = this.scroller.hasHorizontalScroll ? 'block' : 'none';
                  Severity: Major
                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 2 hrs to fix

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

                            if ( !time && utils.isBadAndroid ) {
                                this.indicatorStyle[durationProp] = '0.0001ms';
                                // remove 0.0001ms
                                var self = this;
                                rAF(function() {
                    Severity: Major
                    Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 2 hrs to fix
                    src/qt/res/assets/plugins/iscroll/iscroll.js on lines 866..875

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

                    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 ( this.options.shrink == 'clip' ) {
                                    this.minBoundaryY = -this.indicatorHeight + 8;
                                    this.maxBoundaryY = this.wrapperHeight - 8;
                                } else {
                                    this.minBoundaryY = 0;
                    Severity: Major
                    Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 2 hrs to fix
                    src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1978..1984

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

                    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 ( !time && utils.isBadAndroid ) {
                                this.scrollerStyle[durationProp] = '0.0001ms';
                                // remove 0.0001ms
                                var self = this;
                                rAF(function() {
                    Severity: Major
                    Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 2 hrs to fix
                    src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1914..1923

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

                    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 ( this.options.shrink == 'clip' ) {
                                    this.minBoundaryX = -this.indicatorWidth + 8;
                                    this.maxBoundaryX = this.wrapperWidth - 8;
                                } else {
                                    this.minBoundaryX = 0;
                    Severity: Major
                    Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 2 hrs to fix
                    src/qt/res/assets/plugins/iscroll/iscroll.js on lines 2000..2006

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

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

                        _end: function (e) {
                            if ( !this.enabled || utils.eventType[e.type] !== this.initiated ) {
                                return;
                            }
                    
                    
                    Severity: Major
                    Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 2 hrs to fix

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

                              p.init = function (ft) {
                                  p.footable = ft;
                                  if (ft.options.sort === true) {
                                      $(ft.table)
                                          .unbind('.sorting')
                      Severity: Major
                      Found in src/qt/res/assets/plugins/footable/footable.sort.js - About 2 hrs to fix

                        Function redraw has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                ft.redraw = function () {
                                    //add the toggler to each row
                                    ft.addRowToggle();
                        
                                    //bind the toggle selector click events
                        Severity: Major
                        Found in src/qt/res/assets/plugins/footable/footable.js - About 2 hrs to fix

                          Function IScroll has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function IScroll (el, options) {
                              this.wrapper = typeof el == 'string' ? document.querySelector(el) : el;
                              this.scroller = this.wrapper.children[0];
                              this.scrollerStyle = this.scroller.style;        // cache style for better performance
                          
                          
                          Severity: Major
                          Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 2 hrs to fix

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

                                    ft.init = function () {
                                        var $window = $(w), $table = $(ft.table);
                            
                                        w.footable.plugins.init(ft);
                            
                            
                            Severity: Major
                            Found in src/qt/res/assets/plugins/footable/footable.js - About 2 hrs to fix

                              Function _nearestSnap has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  _nearestSnap: function (x, y) {
                                      if ( !this.pages.length ) {
                                          return { x: 0, y: 0, pageX: 0, pageY: 0 };
                                      }
                              
                              
                              Severity: Major
                              Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 2 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language