bcdice/BCDice

View on GitHub

Showing 1,168 of 1,225 total issues

File GurpsFW.rb has 2108 lines of code (exceeds 250 allowed). Consider refactoring.
Open

module BCDice
  module GameSystem
    class GurpsFW < Base
      # ゲームシステムの識別子
      ID = 'GurpsFW'
Severity: Major
Found in lib/bcdice/game_system/GurpsFW.rb - About 5 days to fix

    Method getRandomDiff has 844 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          def getRandomDiff(dice1, dice23, dif, index)
            table = []
    
            case dice1
            when 1 # 洞窟
    Severity: Major
    Found in lib/bcdice/game_system/GurpsFW.rb - About 4 days to fix

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

        module GameSystem
          class Cthulhu7th_Korean < Base
            # ゲームシステムの識別子
            ID = 'Cthulhu7th:Korean'
      
      
      Severity: Major
      Found in lib/bcdice/game_system/Cthulhu7th_Korean.rb and 1 other location - About 3 days to fix
      lib/bcdice/game_system/Cthulhu7th_ChineseTraditional.rb on lines 4..382

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

      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

        module GameSystem
          class Cthulhu7th_ChineseTraditional < Base
            # ゲームシステムの識別子
            ID = 'Cthulhu7th:ChineseTraditional'
      
      
      Severity: Major
      Found in lib/bcdice/game_system/Cthulhu7th_ChineseTraditional.rb and 1 other location - About 3 days to fix
      lib/bcdice/game_system/Cthulhu7th_Korean.rb on lines 4..379

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

      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

      File PastFutureParadox.rb has 1188 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      module BCDice
        module GameSystem
          class PastFutureParadox < Base
            # ゲームシステムの識別子
            ID = "PastFutureParadox"
      Severity: Major
      Found in lib/bcdice/game_system/PastFutureParadox.rb - About 3 days to fix

        File ShinobiGami.rb has 1148 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        require 'bcdice/dice_table/table'
        
        module BCDice
          module GameSystem
            class ShinobiGami < Base
        Severity: Major
        Found in lib/bcdice/game_system/ShinobiGami.rb - About 2 days to fix

          File Elysion.rb has 1110 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          module BCDice
            module GameSystem
              class Elysion < Base
                # ゲームシステムの識別子
                ID = 'Elysion'
          Severity: Major
          Found in lib/bcdice/game_system/Elysion.rb - About 2 days to fix

            Method eval_game_system_specific_command has 462 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  def eval_game_system_specific_command(string)
                    tableName = ""
                    result = ""
                    number = 0
            
            
            Severity: Major
            Found in lib/bcdice/game_system/GurpsFW.rb - About 2 days to fix

              File table.rb has 912 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              module BCDice
                module GameSystem
                  class MeikyuKingdomBasic
                    TABLES = {
                      "TBT" => DiceTable::Table.new(
              Severity: Major
              Found in lib/bcdice/game_system/meikyu_kingdom_basic/table.rb - About 2 days to fix

                Method getRandomEvent has 417 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      def getRandomEvent(dice1, dice2, diff)
                        case diff
                        when "E"
                          dif = "初級"
                          d = 0
                Severity: Major
                Found in lib/bcdice/game_system/GurpsFW.rb - About 2 days to fix

                  File MetalHeadExtream.rb has 828 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  module BCDice
                    module GameSystem
                      class MetalHeadExtream < Base
                        # ゲームシステムの識別子
                        ID = 'MetalHeadExtream'
                  Severity: Major
                  Found in lib/bcdice/game_system/MetalHeadExtream.rb - About 1 day to fix

                    File DivineCharger.rb has 790 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    module BCDice
                      module GameSystem
                        class DivineCharger < Base
                          # ゲームシステムの識別子
                          ID = 'DivineCharger'
                    Severity: Major
                    Found in lib/bcdice/game_system/DivineCharger.rb - About 1 day to fix

                      File HeroScale.rb has 762 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      module BCDice
                        module GameSystem
                          class HeroScale < Base
                            # ゲームシステムの識別子
                            ID = 'HeroScale'
                      Severity: Major
                      Found in lib/bcdice/game_system/HeroScale.rb - About 1 day to fix

                        File KanColle.rb has 754 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        require 'bcdice/dice_table/table'
                        
                        module BCDice
                          module GameSystem
                            class KanColle < Base
                        Severity: Major
                        Found in lib/bcdice/game_system/KanColle.rb - About 1 day to fix

                          File tables.rb has 717 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          module BCDice
                            module GameSystem
                              class Satasupe < Base
                                TAG_TABLE = DiceTable::D66GridTable.new(
                                  "タグ決定表",
                          Severity: Major
                          Found in lib/bcdice/game_system/satasupe/tables.rb - About 1 day to fix

                            File HatsuneMiku.rb has 712 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            module BCDice
                              module GameSystem
                                class HatsuneMiku < Base
                                  # ゲームシステムの識別子
                                  ID = 'HatsuneMiku'
                            Severity: Major
                            Found in lib/bcdice/game_system/HatsuneMiku.rb - About 1 day to fix

                              Method get_hit_table has 313 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                    def get_hit_table(hitPart, roc)
                                      case hitPart
                                      when 'HU'
                                        name = '命中部位表:人間'
                                        table = [
                              Severity: Major
                              Found in lib/bcdice/game_system/MetalHeadExtream.rb - About 1 day to fix

                                File tables.rb has 655 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                module BCDice
                                  module GameSystem
                                    class OneWayHeroics < Base
                                      class GoldFlow
                                        def initialize(times, action)
                                Severity: Major
                                Found in lib/bcdice/game_system/one_way_heroics/tables.rb - About 1 day to fix

                                  File ShoujoTenrankai.rb has 652 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  module BCDice
                                    module GameSystem
                                      class ShoujoTenrankai < Base
                                        # ゲームシステムの識別子
                                        ID = 'ShoujoTenrankai'
                                  Severity: Major
                                  Found in lib/bcdice/game_system/ShoujoTenrankai.rb - About 1 day to fix

                                    File Garako.rb has 615 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    require 'bcdice/dice_table/table'
                                    require 'bcdice/dice_table/range_table'
                                    require 'bcdice/format'
                                    
                                    module BCDice
                                    Severity: Major
                                    Found in lib/bcdice/game_system/Garako.rb - About 1 day to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language