o-jill/washcrus

View on GitHub

Showing 31 of 98 total issues

File ui.js has 623 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
* ban: 将棋盤の色(画像の時はtransparentにする)
* hover: マス目にカーソルが乗った時の色
* active: 選択中のマス目の色
* movable: 選択中の駒が指せるマス目の色
Severity: Major
Found in js/ui.js - About 1 day to fix

    Class WashCrus has 39 methods (exceeds 20 allowed). Consider refactoring.
    Open

    class WashCrus
    # 初期化
    #
    # @param cgi CGIオブジェクト
    def initialize(cgi)
    Severity: Minor
    Found in washcrus.rb - About 5 hrs to fix

      Class MatchInfoFile has 36 methods (exceeds 20 allowed). Consider refactoring.
      Open

      class MatchInfoFile
      include MatchInfoFileUtil
      # 初期化
      #
      # @param gameid 対局ID
      Severity: Minor
      Found in file/matchinfofile.rb - About 4 hrs to fix

        Class TaikyokuData has 34 methods (exceeds 20 allowed). Consider refactoring.
        Open

        class TaikyokuData
        include MyLock
        # 初期化
        def initialize
        # @idb = '', @playerb = '', @emailb = ''
        Severity: Minor
        Found in game/taikyokudata.rb - About 4 hrs to fix

          File komaabs.js has 322 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
          * 汎用駒クラス
          *
          * @class
          * @constructor
          Severity: Minor
          Found in js/komaabs.js - About 3 hrs to fix

            Class BrowserTestAbstract has 29 methods (exceeds 20 allowed). Consider refactoring.
            Open

            class BrowserTestAbstract
            def initialize
            # Firefox用のドライバを使う
            @driver = Selenium::WebDriver.for :firefox
            @wait = Selenium::WebDriver::Wait.new(timeout: 10)
            Severity: Minor
            Found in travisci/browsertestabs.rb - About 3 hrs to fix

              File kifu.js has 307 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /**
              * 棋譜管理クラス
              *
              * @class
              * @constructor
              Severity: Minor
              Found in js/kifu.js - About 3 hrs to fix

                Class BrowserTest has 28 methods (exceeds 20 allowed). Consider refactoring.
                Open

                class BrowserTest < BrowserTestAbstract
                def initialize
                super
                end
                 
                 
                Severity: Minor
                Found in travisci/browsertest.rb - About 3 hrs to fix

                  File taikyokudata.rb has 280 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  require 'digest/sha2'
                  require 'time'
                  require 'uri'
                  require 'logger'
                   
                   
                  Severity: Minor
                  Found in game/taikyokudata.rb - About 2 hrs to fix

                    Class JsonKifu has 23 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                    class JsonKifu
                    # 初期化
                    #
                    # @param tid 対局ID
                    def initialize(tid)
                    Severity: Minor
                    Found in file/jsonkifu.rb - About 2 hrs to fix

                      Class TestGame has 23 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                      class TestGame < TestGameAbstract
                      # 初期化
                      def initialize
                      super
                      end
                      Severity: Minor
                      Found in travisci/testgame.rb - About 2 hrs to fix

                        Class UserInfoFileContent has 23 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                        class UserInfoFileContent
                        KEY = Globals::KEY
                         
                        # 初期化
                        def initialize
                        Severity: Minor
                        Found in file/userinfofilecontent.rb - About 2 hrs to fix

                          Class TaikyokuFileContent has 22 methods (exceeds 20 allowed). Consider refactoring.
                          Open

                          class TaikyokuFileContent
                          # 初期化
                          def initialize
                          @idbs = {}
                          @idws = {}
                          Severity: Minor
                          Found in file/taikyokufilecontent.rb - About 2 hrs to fix

                            Function readLineCSA has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                            Open

                            Kifu.prototype.readLineCSA = function(text) {
                            if (/^[+-][0-9]{4}{FU|KY|KE|GI|KI|OU|HI|KA|TO|NY|NE|NG|RY|UM}/.test(text)) {
                            var letters = text.split('');
                            // 0 1 2 3 4 5 6
                            // + 7 7 7 6 F U
                            Severity: Minor
                            Found in js/kifu.js - About 1 hr to fix

                            Method check_param has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def check_param
                            # gameid が無いよ
                            # @log.debug "MyHtml.illegalaccess gid:#{gameid}" unless gameid
                            return MyHtml.puts_textplain_illegalaccess unless gameid
                             
                             
                            Severity: Minor
                            Found in move.rb - About 45 mins to fix

                            Method send_htmlmailex has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def send_htmlmailex(addr, subject, msg, html, attach)
                            Severity: Minor
                            Found in util/mailmgr.rb - About 35 mins to fix

                              Method send_htmlmailex_withfooter has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              def send_htmlmailex_withfooter(addr, subject, msg, html, attached)
                              Severity: Minor
                              Found in util/mailmgr.rb - About 35 mins to fix

                                Method findgameid has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                def findgameid(tdb, plyb, plyw, from, to)
                                Severity: Minor
                                Found in views/searchresult.rb - About 35 mins to fix

                                  Method perform has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  def perform
                                  # gameid が無いよ, userinfoが変だよ, moveが変だよ, 存在しないはずのIDだよ
                                  return unless check_param
                                   
                                  @log.debug('Move.read data')
                                  Severity: Minor
                                  Found in move.rb - About 35 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                  if (text.startsWith('$TIME_LIMIT:')) return this.timelimit = text.slice(12);
                                  Severity: Major
                                  Found in js/kifu.js - About 30 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language