nabeelamjad/poke-api

View on GitHub

Showing 23 of 71 total issues

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

module POGOProtos
  module Settings
    MapSettings = Google::Protobuf::DescriptorPool.generated_pool.lookup("POGOProtos.Settings.MapSettings").msgclass
    FortSettings = Google::Protobuf::DescriptorPool.generated_pool.lookup("POGOProtos.Settings.FortSettings").msgclass
    GpsSettings = Google::Protobuf::DescriptorPool.generated_pool.lookup("POGOProtos.Settings.GpsSettings").msgclass
Severity: Major
Found in lib/poke-api/pogoprotos/pogoprotos_settings.rb and 1 other location - About 1 hr to fix
lib/poke-api/pogoprotos/pogoprotos_map_fort.rb on lines 60..68

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

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 Map
    module Fort
      FortSummary = Google::Protobuf::DescriptorPool.generated_pool.lookup("POGOProtos.Map.Fort.FortSummary").msgclass
      FortModifier = Google::Protobuf::DescriptorPool.generated_pool.lookup("POGOProtos.Map.Fort.FortModifier").msgclass
      FortData = Google::Protobuf::DescriptorPool.generated_pool.lookup("POGOProtos.Map.Fort.FortData").msgclass
Severity: Major
Found in lib/poke-api/pogoprotos/pogoprotos_map_fort.rb and 1 other location - About 1 hr to fix
lib/poke-api/pogoprotos/pogoprotos_settings.rb on lines 54..62

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

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

    while 2 * y * d < m && steps < step_limit
      y += d
      steps += 1
      lat = x * step_size + starting_lat + rand * ((rlow - rhigh) + rlow)
      lng = y * step_size + starting_lng + rand * ((rlow - rhigh) + rlow)
Severity: Major
Found in examples/spiral_search.rb and 1 other location - About 1 hr to fix
examples/spiral_search.rb on lines 15..21

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

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

    while 2 * x * d < m && steps < step_limit
      x += d
      steps += 1
      lat = x * step_size + starting_lat + rand * ((rlow - rhigh) + rlow)
      lng = y * step_size + starting_lng + rand * ((rlow - rhigh) + rlow)
Severity: Major
Found in examples/spiral_search.rb and 1 other location - About 1 hr to fix
examples/spiral_search.rb on lines 22..28

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

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

  add_enum "POGOProtos.Networking.Responses.StartGymBattleResponse.Result" do
    value :UNSET, 0
    value :SUCCESS, 1
    value :ERROR_GYM_NOT_FOUND, 2
    value :ERROR_GYM_NEUTRAL, 3
Severity: Minor
Found in lib/poke-api/pogoprotos/pogoprotos_networking_responses.rb and 1 other location - About 55 mins to fix
lib/poke-api/pogoprotos/pogoprotos_enums.rb on lines 298..312

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

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

  add_enum "POGOProtos.Enums.CameraTarget" do
    value :CAM_TARGET_ATTACKER, 0
    value :CAM_TARGET_ATTACKER_EDGE, 1
    value :CAM_TARGET_ATTACKER_GROUND, 2
    value :CAM_TARGET_DEFENDER, 3
Severity: Minor
Found in lib/poke-api/pogoprotos/pogoprotos_enums.rb and 1 other location - About 55 mins to fix
lib/poke-api/pogoprotos/pogoprotos_networking_responses.rb on lines 206..220

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

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

  add_message "POGOProtos.Settings.Master.Item.IncenseAttributes" do
    optional :incense_lifetime_seconds, :int32, 1
    repeated :pokemon_type, :enum, 2, "POGOProtos.Enums.PokemonType"
    optional :pokemon_incense_type_probability, :float, 3
    optional :standing_time_between_encounters_seconds, :int32, 4
Severity: Minor
Found in lib/poke-api/pogoprotos/pogoprotos_settings_master_item.rb and 1 other location - About 30 mins to fix
lib/poke-api/pogoprotos/pogoprotos_networking_requests_messages.rb on lines 106..113

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

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

  add_message "POGOProtos.Networking.Requests.Messages.CatchPokemonMessage" do
    optional :encounter_id, :fixed64, 1
    optional :pokeball, :enum, 2, "POGOProtos.Inventory.Item.ItemId"
    optional :normalized_reticle_size, :double, 3
    optional :spawn_point_id, :string, 4
lib/poke-api/pogoprotos/pogoprotos_settings_master_item.rb on lines 15..22

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

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 3 locations. Consider refactoring.
Open

  add_message "POGOProtos.Settings.Master.IapSettings" do
    optional :daily_bonus_coins, :int32, 1
    repeated :daily_defender_bonus_per_pokemon, :int32, 2
    optional :daily_defender_bonus_max_defenders, :int32, 3
    repeated :daily_defender_bonus_currency, :string, 4
Severity: Minor
Found in lib/poke-api/pogoprotos/pogoprotos_settings_master.rb and 2 other locations - About 30 mins to fix
lib/poke-api/pogoprotos/pogoprotos_networking_responses.rb on lines 320..327
lib/poke-api/pogoprotos/pogoprotos_settings.rb on lines 7..14

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

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 3 locations. Consider refactoring.
Open

  add_message "POGOProtos.Networking.Responses.UseItemCaptureResponse" do
    optional :success, :bool, 1
    optional :item_capture_mult, :double, 2
    optional :item_flee_mult, :double, 3
    optional :stop_movement, :bool, 4
Severity: Minor
Found in lib/poke-api/pogoprotos/pogoprotos_networking_responses.rb and 2 other locations - About 30 mins to fix
lib/poke-api/pogoprotos/pogoprotos_settings.rb on lines 7..14
lib/poke-api/pogoprotos/pogoprotos_settings_master.rb on lines 11..18

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

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 3 locations. Consider refactoring.
Open

  add_message "POGOProtos.Settings.MapSettings" do
    optional :pokemon_visible_range, :double, 1
    optional :poke_nav_range_meters, :double, 2
    optional :encounter_range_meters, :double, 3
    optional :get_map_objects_min_refresh_seconds, :float, 4
Severity: Minor
Found in lib/poke-api/pogoprotos/pogoprotos_settings.rb and 2 other locations - About 30 mins to fix
lib/poke-api/pogoprotos/pogoprotos_networking_responses.rb on lines 320..327
lib/poke-api/pogoprotos/pogoprotos_settings_master.rb on lines 11..18

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

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 3 locations. Consider refactoring.
Open

  add_message "POGOProtos.Settings.FortSettings" do
    optional :interaction_range_meters, :double, 1
    optional :max_total_deployed_pokemon, :int32, 2
    optional :max_player_deployed_pokemon, :int32, 3
    optional :deploy_stamina_multiplier, :double, 4
Severity: Minor
Found in lib/poke-api/pogoprotos/pogoprotos_settings.rb and 2 other locations - About 20 mins to fix
lib/poke-api/pogoprotos/pogoprotos_data.rb on lines 56..62
lib/poke-api/pogoprotos/pogoprotos_networking_requests_messages.rb on lines 90..96

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

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

  add_enum "POGOProtos.Networking.Responses.EncounterResponse.Status" do
    value :ENCOUNTER_ERROR, 0
    value :ENCOUNTER_SUCCESS, 1
    value :ENCOUNTER_NOT_FOUND, 2
    value :ENCOUNTER_CLOSED, 3
Severity: Minor
Found in lib/poke-api/pogoprotos/pogoprotos_networking_responses.rb and 1 other location - About 20 mins to fix
lib/poke-api/pogoprotos/pogoprotos_networking_responses.rb on lines 56..64

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

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 3 locations. Consider refactoring.
Open

  add_message "POGOProtos.Data.AssetDigestEntry" do
    optional :asset_id, :string, 1
    optional :bundle_name, :string, 2
    optional :version, :int64, 3
    optional :checksum, :fixed32, 4
Severity: Minor
Found in lib/poke-api/pogoprotos/pogoprotos_data.rb and 2 other locations - About 20 mins to fix
lib/poke-api/pogoprotos/pogoprotos_networking_requests_messages.rb on lines 90..96
lib/poke-api/pogoprotos/pogoprotos_settings.rb on lines 16..22

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

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 3 locations. Consider refactoring.
Open

  add_message "POGOProtos.Networking.Requests.Messages.GetGymDetailsMessage" do
    optional :gym_id, :string, 1
    optional :player_latitude, :double, 2
    optional :player_longitude, :double, 3
    optional :gym_latitude, :double, 4
lib/poke-api/pogoprotos/pogoprotos_data.rb on lines 56..62
lib/poke-api/pogoprotos/pogoprotos_settings.rb on lines 16..22

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

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

  add_enum "POGOProtos.Networking.Responses.UseItemEggIncubatorResponse.Result" do
    value :UNSET, 0
    value :SUCCESS, 1
    value :ERROR_INCUBATOR_NOT_FOUND, 2
    value :ERROR_POKEMON_EGG_NOT_FOUND, 3
Severity: Minor
Found in lib/poke-api/pogoprotos/pogoprotos_networking_responses.rb and 1 other location - About 20 mins to fix
lib/poke-api/pogoprotos/pogoprotos_networking_responses.rb on lines 76..84

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

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 Settings
    module Master
      module Pokemon
        CameraAttributes = Google::Protobuf::DescriptorPool.generated_pool.lookup("POGOProtos.Settings.Master.Pokemon.CameraAttributes").msgclass
        EncounterAttributes = Google::Protobuf::DescriptorPool.generated_pool.lookup("POGOProtos.Settings.Master.Pokemon.EncounterAttributes").msgclass
Severity: Minor
Found in lib/poke-api/pogoprotos/pogoprotos_settings_master_pokemon.rb and 1 other location - About 20 mins to fix
lib/poke-api/pogoprotos/pogoprotos_map_pokemon.rb on lines 35..40

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

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 POGOProtos
  module Map
    module Pokemon
      WildPokemon = Google::Protobuf::DescriptorPool.generated_pool.lookup("POGOProtos.Map.Pokemon.WildPokemon").msgclass
      NearbyPokemon = Google::Protobuf::DescriptorPool.generated_pool.lookup("POGOProtos.Map.Pokemon.NearbyPokemon").msgclass
Severity: Minor
Found in lib/poke-api/pogoprotos/pogoprotos_map_pokemon.rb and 1 other location - About 20 mins to fix
lib/poke-api/pogoprotos/pogoprotos_settings_master_pokemon.rb on lines 35..40

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

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 5 locations. Consider refactoring.
Open

  add_message "POGOProtos.Data.PokedexEntry" do
    optional :pokemon_id, :enum, 1, "POGOProtos.Enums.PokemonId"
    optional :times_encountered, :int32, 2
    optional :times_captured, :int32, 3
    optional :evolution_stone_pieces, :int32, 4
Severity: Minor
Found in lib/poke-api/pogoprotos/pogoprotos_data.rb and 4 other locations - About 15 mins to fix
lib/poke-api/pogoprotos/pogoprotos_data.rb on lines 77..82
lib/poke-api/pogoprotos/pogoprotos_map_pokemon.rb on lines 18..23
lib/poke-api/pogoprotos/pogoprotos_networking_requests_messages.rb on lines 14..19
lib/poke-api/pogoprotos/pogoprotos_networking_requests_messages.rb on lines 215..220

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

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 5 locations. Consider refactoring.
Open

  add_message "POGOProtos.Map.Pokemon.NearbyPokemon" do
    optional :pokemon_id, :enum, 1, "POGOProtos.Enums.PokemonId"
    optional :distance_in_meters, :float, 2
    optional :encounter_id, :fixed64, 3
    optional :fort_id, :string, 4
Severity: Minor
Found in lib/poke-api/pogoprotos/pogoprotos_map_pokemon.rb and 4 other locations - About 15 mins to fix
lib/poke-api/pogoprotos/pogoprotos_data.rb on lines 64..69
lib/poke-api/pogoprotos/pogoprotos_data.rb on lines 77..82
lib/poke-api/pogoprotos/pogoprotos_networking_requests_messages.rb on lines 14..19
lib/poke-api/pogoprotos/pogoprotos_networking_requests_messages.rb on lines 215..220

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

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

Severity
Category
Status
Source
Language