slack-ruby/slack-ruby-client

View on GitHub

Showing 149 of 149 total issues

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

          def workflows_stepFailed(options = {})
            raise ArgumentError, 'Required arguments :error missing' if options[:error].nil?
            raise ArgumentError, 'Required arguments :workflow_step_execute_id missing' if options[:workflow_step_execute_id].nil?
            options = encode_options_as_json(options, %i[error])
            post('workflows.stepFailed', options)
Severity: Major
Found in lib/slack/web/api/endpoints/workflows.rb and 5 other locations - About 20 mins to fix
lib/slack/web/api/endpoints/admin_conversations.rb on lines 290..294
lib/slack/web/api/endpoints/apps_manifest.rb on lines 55..59
lib/slack/web/api/endpoints/dialog.rb on lines 18..22
lib/slack/web/api/endpoints/functions.rb on lines 33..37
lib/slack/web/api/endpoints/views.rb on lines 38..42

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

          def functions_completeSuccess(options = {})
            raise ArgumentError, 'Required arguments :function_execution_id missing' if options[:function_execution_id].nil?
            raise ArgumentError, 'Required arguments :outputs missing' if options[:outputs].nil?
            options = encode_options_as_json(options, %i[outputs])
            post('functions.completeSuccess', options)
Severity: Major
Found in lib/slack/web/api/endpoints/functions.rb and 5 other locations - About 20 mins to fix
lib/slack/web/api/endpoints/admin_conversations.rb on lines 290..294
lib/slack/web/api/endpoints/apps_manifest.rb on lines 55..59
lib/slack/web/api/endpoints/dialog.rb on lines 18..22
lib/slack/web/api/endpoints/views.rb on lines 38..42
lib/slack/web/api/endpoints/workflows.rb on lines 32..36

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 Slack
  module Web
    module Api
      module Mixins
        module Users
Severity: Minor
Found in lib/slack/web/api/mixins/users.id.rb and 1 other location - About 20 mins to fix
lib/slack/web/api/mixins/conversations.id.rb on lines 4..19

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 Slack
  module Web
    module Api
      module Mixins
        module Conversations
Severity: Minor
Found in lib/slack/web/api/mixins/conversations.id.rb and 1 other location - About 20 mins to fix
lib/slack/web/api/mixins/users.id.rb on lines 4..19

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

          def admin_conversations_setConversationPrefs(options = {})
            raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
            raise ArgumentError, 'Required arguments :prefs missing' if options[:prefs].nil?
            options = encode_options_as_json(options, %i[prefs])
            post('admin.conversations.setConversationPrefs', options)
Severity: Major
Found in lib/slack/web/api/endpoints/admin_conversations.rb and 5 other locations - About 20 mins to fix
lib/slack/web/api/endpoints/apps_manifest.rb on lines 55..59
lib/slack/web/api/endpoints/dialog.rb on lines 18..22
lib/slack/web/api/endpoints/functions.rb on lines 33..37
lib/slack/web/api/endpoints/views.rb on lines 38..42
lib/slack/web/api/endpoints/workflows.rb on lines 32..36

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

          def dialog_open(options = {})
            raise ArgumentError, 'Required arguments :dialog missing' if options[:dialog].nil?
            raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
            options = encode_options_as_json(options, %i[dialog])
            post('dialog.open', options)
Severity: Major
Found in lib/slack/web/api/endpoints/dialog.rb and 5 other locations - About 20 mins to fix
lib/slack/web/api/endpoints/admin_conversations.rb on lines 290..294
lib/slack/web/api/endpoints/apps_manifest.rb on lines 55..59
lib/slack/web/api/endpoints/functions.rb on lines 33..37
lib/slack/web/api/endpoints/views.rb on lines 38..42
lib/slack/web/api/endpoints/workflows.rb on lines 32..36

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

  module Web
    module Api
      module Endpoints
        module CanvasesSections
          #
Severity: Minor
Found in lib/slack/web/api/endpoints/canvases_sections.rb and 2 other locations - About 20 mins to fix
lib/slack/web/api/endpoints/apps.rb on lines 5..21
lib/slack/web/api/endpoints/files_comments.rb on lines 5..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 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 3 locations. Consider refactoring.
Open

  module Web
    module Api
      module Endpoints
        module FilesComments
          #
Severity: Minor
Found in lib/slack/web/api/endpoints/files_comments.rb and 2 other locations - About 20 mins to fix
lib/slack/web/api/endpoints/apps.rb on lines 5..21
lib/slack/web/api/endpoints/canvases_sections.rb on lines 5..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 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 3 locations. Consider refactoring.
Open

  module Web
    module Api
      module Endpoints
        module Apps
          #
Severity: Minor
Found in lib/slack/web/api/endpoints/apps.rb and 2 other locations - About 20 mins to fix
lib/slack/web/api/endpoints/canvases_sections.rb on lines 5..21
lib/slack/web/api/endpoints/files_comments.rb on lines 5..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 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

Severity
Category
Status
Source
Language