mayoral/telegrammer

View on GitHub

Showing 13 of 16 total issues

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

  module DataTypes
    # Telegram InlineQueryResultDocument data type
    #
    # @attr [String] type Type of the result, must be document
    # @attr [String] id Unique identifier for this result, 1-64 Bytes
lib/telegrammer/data_types/inline_query_result/inline_query_result_venue.rb on lines 2..31

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

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 DataTypes
    # Telegram InlineQueryResultVenue data type
    #
    # @attr [String] type Type of the result, must be article
    # @attr [String] id Unique identifier for this result, 1-64 Bytes
lib/telegrammer/data_types/inline_query_result/inline_query_result_document.rb on lines 2..31

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

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 DataTypes
    # Telegram InlineQueryResultPhoto data type
    #
    # @attr [String] type Type of the result, must be photo
    # @attr [String] id Unique identifier for this result, 1-64 Bytes
lib/telegrammer/data_types/inline_query_result/inline_query_result_article.rb on lines 2..29

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

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 DataTypes
    # Telegram InlineQueryResultArticle data type
    #
    # @attr [String] type Type of the result, must be article
    # @attr [String] id Unique identifier for this result, 1-64 Bytes
lib/telegrammer/data_types/inline_query_result/inline_query_result_photo.rb on lines 2..29

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

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

  module DataTypes
    # Telegram InlineQueryResultLocation data type
    #
    # @attr [String] type Type of the result, must be location
    # @attr [String] id Unique identifier for this result, 1-64 Bytes
lib/telegrammer/data_types/inline_query_result/inline_query_result_contact.rb on lines 2..27
lib/telegrammer/data_types/inline_query_result/inline_query_result_mpeg4_gif.rb on lines 2..27

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

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

  module DataTypes
    # Telegram InlineQueryResultContact data type
    #
    # @attr [String] type Type of the result, must be contact
    # @attr [String] id Unique identifier for this result, 1-64 Bytes
lib/telegrammer/data_types/inline_query_result/inline_query_result_location.rb on lines 2..27
lib/telegrammer/data_types/inline_query_result/inline_query_result_mpeg4_gif.rb on lines 2..27

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

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

  module DataTypes
    # Telegram InlineQueryResultMpeg4Gif data type
    #
    # @attr [String] type Type of the result, must be mpeg4_gif
    # @attr [String] id Unique identifier for this result, 1-64 bytes
lib/telegrammer/data_types/inline_query_result/inline_query_result_contact.rb on lines 2..27
lib/telegrammer/data_types/inline_query_result/inline_query_result_location.rb on lines 2..27

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

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

  module DataTypes
    # Telegram InlineQueryResultCachedGif data type
    #
    # @attr [String] type Type of the result, must be gif
    # @attr [String] id Unique identifier for this result, 1-64 Bytes
lib/telegrammer/data_types/inline_query_result/inline_query_result_audio.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_document.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_mpeg4_gif.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_photo.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_video.rb on lines 2..23

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

  module DataTypes
    # Telegram InlineQueryResultAudio data type
    #
    # @attr [String] type Type of the result, must be audio
    # @attr [String] id Unique identifier for this result, 1-64 Bytes
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_document.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_gif.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_mpeg4_gif.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_photo.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_video.rb on lines 2..23

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

  module DataTypes
    # Telegram InlineQueryResultCachedDocument data type
    #
    # @attr [String] type Type of the result, must be document
    # @attr [String] id Unique identifier for this result, 1-64 Bytes
lib/telegrammer/data_types/inline_query_result/inline_query_result_audio.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_gif.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_mpeg4_gif.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_photo.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_video.rb on lines 2..23

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

  module DataTypes
    # Telegram InlineQueryResultCachedPhoto data type
    #
    # @attr [String] type Type of the result, must be photo
    # @attr [String] id Unique identifier for this result, 1-64 Bytes
lib/telegrammer/data_types/inline_query_result/inline_query_result_audio.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_document.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_gif.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_mpeg4_gif.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_video.rb on lines 2..23

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

  module DataTypes
    # Telegram InlineQueryResultCachedVideo data type
    #
    # @attr [String] type Type of the result, must be video
    # @attr [String] id Unique identifier for this result, 1-64 Bytes
lib/telegrammer/data_types/inline_query_result/inline_query_result_audio.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_document.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_gif.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_mpeg4_gif.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_photo.rb on lines 2..23

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

  module DataTypes
    # Telegram InlineQueryResultCachedMpeg4Gif data type
    #
    # @attr [String] type Type of the result, must be mpeg4_gif
    # @attr [String] id Unique identifier for this result, 1-64 Bytes
lib/telegrammer/data_types/inline_query_result/inline_query_result_audio.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_document.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_gif.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_photo.rb on lines 2..23
lib/telegrammer/data_types/inline_query_result/inline_query_result_cached_video.rb on lines 2..23

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

Severity
Category
Status
Source
Language