Arie/tf2_line_parser

View on GitHub

Showing 13 of 17 total issues

Method initialize has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

      def initialize(time, player_name, player_steamid, player_team, target_name, target_steamid, target_team, value, weapon, airshot)
Severity: Major
Found in lib/tf2_line_parser/events/airshot.rb - About 1 hr to fix

    Method initialize has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

          def initialize(time, player_name, player_steamid, player_team, target_name, target_steamid, target_team, value, weapon)
    Severity: Major
    Found in lib/tf2_line_parser/events/headshot_damage.rb - About 1 hr to fix

      Method initialize has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

            def initialize(time, player_name, player_steam_id, player_team, target_name, target_steam_id, target_team, weapon, customkill)
      Severity: Major
      Found in lib/tf2_line_parser/events/kill.rb - About 1 hr to fix

        Method initialize has 9 arguments (exceeds 4 allowed). Consider refactoring.
        Open

              def initialize(time, player_name, player_steamid, player_team, target_name, target_steamid, target_team, value, weapon)
        Severity: Major
        Found in lib/tf2_line_parser/events/damage.rb - About 1 hr to fix

          Method initialize has 9 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                def initialize(time, player_name, player_steam_id, player_team, target_name, target_steam_id, target_team, healing, ubercharge)
          Severity: Major
          Found in lib/tf2_line_parser/events/medic_death.rb - About 1 hr to fix

            Method initialize has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                  def initialize(time, player_name, player_steam_id, player_team, target_name, target_steam_id, target_team, value)
            Severity: Major
            Found in lib/tf2_line_parser/events/heal.rb - About 1 hr to fix

              Method initialize has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                    def initialize(time, player_name, player_steam_id, player_team, target_name, target_steam_id, target_team)
              Severity: Major
              Found in lib/tf2_line_parser/events/pvp_event.rb - About 50 mins to fix

                Method initialize has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                      def initialize(time, player_name, player_steam_id, player_team, cap_number, cap_name)
                Severity: Minor
                Found in lib/tf2_line_parser/events/capture_block.rb - About 45 mins to fix

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

                        def initialize(time, player_name, player_steam_id, player_team, message)
                  Severity: Minor
                  Found in lib/tf2_line_parser/events/disconnect.rb - About 35 mins to fix

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

                          def initialize(time, player_name, player_steam_id, player_team, item = self.class.item)
                    Severity: Minor
                    Found in lib/tf2_line_parser/events/player_action_event.rb - About 35 mins to fix

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

                            def initialize(time, player_name, player_steam_id, player_team, message)
                      Severity: Minor
                      Found in lib/tf2_line_parser/events/chat.rb - About 35 mins to fix

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

                              def initialize(time, player_name, player_steam_id, player_team, message)
                        Severity: Minor
                        Found in lib/tf2_line_parser/events/connect.rb - About 35 mins to fix

                          Method parse has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def parse
                                Events::Event.types.each do |type|
                                  begin
                                    match = line.match(type.regex)
                                  rescue ArgumentError
                          Severity: Minor
                          Found in lib/tf2_line_parser/line.rb - About 25 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Severity
                          Category
                          Status
                          Source
                          Language