nulogy/Gorgon

View on GitHub

Showing 51 of 111 total issues

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

      class Bind < Protocol::Method
        @name = "queue.bind"
        @method_id = 20
        @index = 0x00320014 # 50, 20, 3276820
        @packed_indexes = [50, 20].pack(PACK_UINT16_X2).freeze
Severity: Major
Found in lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb and 2 other locations - About 2 hrs to fix
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 899..926
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 953..980

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

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

      class Bind < Protocol::Method
        @name = "exchange.bind"
        @method_id = 30
        @index = 0x0028001E # 40, 30, 2621470
        @packed_indexes = [40, 30].pack(PACK_UINT16_X2).freeze
Severity: Major
Found in lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb and 2 other locations - About 2 hrs to fix
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 953..980
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1081..1108

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

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

      class Unbind < Protocol::Method
        @name = "exchange.unbind"
        @method_id = 40
        @index = 0x00280028 # 40, 40, 2621480
        @packed_indexes = [40, 40].pack(PACK_UINT16_X2).freeze
Severity: Major
Found in lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb and 2 other locations - About 2 hrs to fix
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 899..926
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1081..1108

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

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

      class FlowOk < Protocol::Method
        @name = "channel.flow-ok"
        @method_id = 21
        @index = 0x00140015 # 20, 21, 1310741
        @packed_indexes = [20, 21].pack(PACK_UINT16_X2).freeze
Severity: Major
Found in lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb and 2 other locations - About 2 hrs to fix
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 637..668
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 2248..2279

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

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

      class Select < Protocol::Method
        @name = "confirm.select"
        @method_id = 10
        @index = 0x0055000A # 85, 10, 5570570
        @packed_indexes = [85, 10].pack(PACK_UINT16_X2).freeze
Severity: Major
Found in lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb and 2 other locations - About 2 hrs to fix
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 637..668
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 673..704

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

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

      class Flow < Protocol::Method
        @name = "channel.flow"
        @method_id = 20
        @index = 0x00140014 # 20, 20, 1310740
        @packed_indexes = [20, 20].pack(PACK_UINT16_X2).freeze
Severity: Major
Found in lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb and 2 other locations - About 2 hrs to fix
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 673..704
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 2248..2279

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

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

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

        def self.decode(data)
          offset = 0
          reply_code = data[offset, 2].unpack(PACK_UINT16).first
          offset += 2
          length = data[offset, 1].unpack(PACK_CHAR).first
Severity: Major
Found in lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb and 1 other location - About 1 hr to fix
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 716..728

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

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

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

        def self.decode(data)
          offset = 0
          reply_code = data[offset, 2].unpack(PACK_UINT16).first
          offset += 2
          length = data[offset, 1].unpack(PACK_CHAR).first
Severity: Major
Found in lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb and 1 other location - About 1 hr to fix
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 442..454

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

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

      class Get < Protocol::Method
        @name = "basic.get"
        @method_id = 70
        @index = 0x003C0046 # 60, 70, 3932230
        @packed_indexes = [60, 70].pack(PACK_UINT16_X2).freeze
Severity: Major
Found in lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb and 1 other location - About 1 hr to fix
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1135..1157

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

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

      class Purge < Protocol::Method
        @name = "queue.purge"
        @method_id = 30
        @index = 0x0032001E # 50, 30, 3276830
        @packed_indexes = [50, 30].pack(PACK_UINT16_X2).freeze
Severity: Major
Found in lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb and 1 other location - About 1 hr to fix
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1833..1855

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

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

      class GetEmpty < Protocol::Method
        @name = "basic.get-empty"
        @method_id = 72
        @index = 0x003C0048 # 60, 72, 3932232
        @packed_indexes = [60, 72].pack(PACK_UINT16_X2).freeze
Severity: Major
Found in lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb and 5 other locations - About 1 hr to fix
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 270..292
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 407..429
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 609..631
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1610..1632
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1681..1703

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

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

      class ConsumeOk < Protocol::Method
        @name = "basic.consume-ok"
        @method_id = 21
        @index = 0x003C0015 # 60, 21, 3932181
        @packed_indexes = [60, 21].pack(PACK_UINT16_X2).freeze
Severity: Major
Found in lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb and 5 other locations - About 1 hr to fix
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 270..292
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 407..429
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 609..631
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1681..1703
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1903..1925

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

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

      class CancelOk < Protocol::Method
        @name = "basic.cancel-ok"
        @method_id = 31
        @index = 0x003C001F # 60, 31, 3932191
        @packed_indexes = [60, 31].pack(PACK_UINT16_X2).freeze
Severity: Major
Found in lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb and 5 other locations - About 1 hr to fix
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 270..292
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 407..429
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 609..631
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1610..1632
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1903..1925

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

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

      class Secure < Protocol::Method
        @name = "connection.secure"
        @method_id = 20
        @index = 0x000A0014 # 10, 20, 655380
        @packed_indexes = [10, 20].pack(PACK_UINT16_X2).freeze
Severity: Major
Found in lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb and 5 other locations - About 1 hr to fix
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 407..429
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 609..631
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1610..1632
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1681..1703
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1903..1925

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

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

      class OpenOk < Protocol::Method
        @name = "channel.open-ok"
        @method_id = 11
        @index = 0x0014000B # 20, 11, 1310731
        @packed_indexes = [20, 11].pack(PACK_UINT16_X2).freeze
Severity: Major
Found in lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb and 5 other locations - About 1 hr to fix
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 270..292
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 407..429
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1610..1632
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1681..1703
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1903..1925

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

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

      class OpenOk < Protocol::Method
        @name = "connection.open-ok"
        @method_id = 41
        @index = 0x000A0029 # 10, 41, 655401
        @packed_indexes = [10, 41].pack(PACK_UINT16_X2).freeze
Severity: Major
Found in lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb and 5 other locations - About 1 hr to fix
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 270..292
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 609..631
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1610..1632
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1681..1703
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1903..1925

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

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

    def exchange_bind(source, destination, opts = {})
      raise_if_no_longer_open!

      source_name = if source.respond_to?(:name)
                      source.name
Severity: Major
Found in lib/gorgon_bunny/lib/gorgon_bunny/channel.rb and 1 other location - About 1 hr to fix
lib/gorgon_bunny/lib/gorgon_bunny/channel.rb on lines 1210..1236

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

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

    def exchange_unbind(source, destination, opts = {})
      raise_if_no_longer_open!

      source_name = if source.respond_to?(:name)
                      source.name
Severity: Major
Found in lib/gorgon_bunny/lib/gorgon_bunny/channel.rb and 1 other location - About 1 hr to fix
lib/gorgon_bunny/lib/gorgon_bunny/channel.rb on lines 1166..1192

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

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

      class Recover < Protocol::Method
        @name = "basic.recover"
        @method_id = 110
        @index = 0x003C006E # 60, 110, 3932270
        @packed_indexes = [60, 110].pack(PACK_UINT16_X2).freeze
Severity: Minor
Found in lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb and 1 other location - About 55 mins to fix
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1995..2013

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

      class DeleteOk < Protocol::Method
        @name = "queue.delete-ok"
        @method_id = 41
        @index = 0x00320029 # 50, 41, 3276841
        @packed_indexes = [50, 41].pack(PACK_UINT16_X2).freeze
Severity: Minor
Found in lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb and 1 other location - About 55 mins to fix
lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb on lines 1162..1182

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

Severity
Category
Status
Source
Language