unclesp1d3r/CipherSwarm

View on GitHub

Showing 475 of 475 total issues

UpdateStatusJob#abandon_inactive_tasks doesn't depend on instance state (maybe move it to another class?)
Open

  def abandon_inactive_tasks
Severity: Minor
Found in app/jobs/update_status_job.rb by reek

A Utility Function is any instance method that has no dependency on the state of the instance.

UpdateStatusJob#remove_incomplete_tasks_status doesn't depend on instance state (maybe move it to another class?)
Open

  def remove_incomplete_tasks_status
Severity: Minor
Found in app/jobs/update_status_job.rb by reek

A Utility Function is any instance method that has no dependency on the state of the instance.

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

  def status_class
    case @status
    when "completed"
      "text-bg-success"
    when "running"
Severity: Minor
Found in app/components/status_pill_component.rb and 1 other location - About 25 mins to fix
app/components/status_pill_component.rb on lines 37..52

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

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 status_icon
    case @status
    when "completed"
      "check-circle"
    when "running"
Severity: Minor
Found in app/components/status_pill_component.rb and 1 other location - About 25 mins to fix
app/components/status_pill_component.rb on lines 18..33

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

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

CalculateMaskComplexityJob#perform has the variable name 'e'
Open

  rescue IOError => e
    Rails.logger.error("Failed to process file for MaskList ##{mask_list_id}: #{e.message}")
  rescue ActiveRecord::RecordInvalid => e

An Uncommunicative Variable Name is a variable name that doesn't communicate its intent well enough.

Poor names make it hard for the reader to build a mental picture of what's going on in the code. They can also be mis-interpreted; and they hurt the flow of reading, because the reader must slow down to interpret the names.

HashcatBenchmark#self.fastest_agent_for_hash_type has the variable name 'v'
Open

    by_hash_type(hash_type).group(:agent_id).sum(:hash_speed).max_by { |_k, v| v }&.first
Severity: Minor
Found in app/models/hashcat_benchmark.rb by reek

An Uncommunicative Variable Name is a variable name that doesn't communicate its intent well enough.

Poor names make it hard for the reader to build a mental picture of what's going on in the code. They can also be mis-interpreted; and they hurt the flow of reading, because the reader must slow down to interpret the names.

Attack#custom_charset_params has the variable name 'i'
Open

    (1..4).map { |i| charset_param(i) }.compact.join(" ")
Severity: Minor
Found in app/models/attack.rb by reek

An Uncommunicative Variable Name is a variable name that doesn't communicate its intent well enough.

Poor names make it hard for the reader to build a mental picture of what's going on in the code. They can also be mis-interpreted; and they hurt the flow of reading, because the reader must slow down to interpret the names.

MaskCalculationMethods#self.calculate_mask_candidates has the variable name 'i'
Open

    i = 0
    while i < mask.length
      if mask[i] == "?" && i + 1 < mask.length
        composite_char = mask[i..i + 1] # Fetch next two characters
        if custom_charsets[composite_char]
Severity: Minor
Found in lib/mask_calculation_methods.rb by reek

An Uncommunicative Variable Name is a variable name that doesn't communicate its intent well enough.

Poor names make it hard for the reader to build a mental picture of what's going on in the code. They can also be mis-interpreted; and they hurt the flow of reading, because the reader must slow down to interpret the names.

EnumInput#initialize has the variable name 'v'
Open

    inclusion_validator = builder.object.class.validators_on(attribute_name).find { |v| v.kind == :inclusion }
Severity: Minor
Found in app/inputs/EnumInput.rb by reek

An Uncommunicative Variable Name is a variable name that doesn't communicate its intent well enough.

Poor names make it hard for the reader to build a mental picture of what's going on in the code. They can also be mis-interpreted; and they hurt the flow of reading, because the reader must slow down to interpret the names.

Unknown property gap
Open

  gap: var(--#{$prefix}stepper-gap);

Properties should be ordered background-color, color
Open

      color: var(--#{$prefix}stepper-active-color);

Multiple consecutive blank lines
Open


Severity: Info
Found in CHANGELOG.md by markdownlint

MD012 - Multiple consecutive blank lines

Tags: whitespace, blank_lines

Aliases: no-multiple-blanks

This rule is triggered when there are multiple consecutive blank lines in the document:

Some text here


Some more text here

To fix this, delete the offending lines:

Some text here

Some more text here

Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

Multiple consecutive blank lines
Open


Severity: Info
Found in CHANGELOG.md by markdownlint

MD012 - Multiple consecutive blank lines

Tags: whitespace, blank_lines

Aliases: no-multiple-blanks

This rule is triggered when there are multiple consecutive blank lines in the document:

Some text here


Some more text here

To fix this, delete the offending lines:

Some text here

Some more text here

Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

Multiple consecutive blank lines
Open


Severity: Info
Found in CHANGELOG.md by markdownlint

MD012 - Multiple consecutive blank lines

Tags: whitespace, blank_lines

Aliases: no-multiple-blanks

This rule is triggered when there are multiple consecutive blank lines in the document:

Some text here


Some more text here

To fix this, delete the offending lines:

Some text here

Some more text here

Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

Multiple consecutive blank lines
Open


Severity: Info
Found in CHANGELOG.md by markdownlint

MD012 - Multiple consecutive blank lines

Tags: whitespace, blank_lines

Aliases: no-multiple-blanks

This rule is triggered when there are multiple consecutive blank lines in the document:

Some text here


Some more text here

To fix this, delete the offending lines:

Some text here

Some more text here

Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

Multiple consecutive blank lines
Open


Severity: Info
Found in CHANGELOG.md by markdownlint

MD012 - Multiple consecutive blank lines

Tags: whitespace, blank_lines

Aliases: no-multiple-blanks

This rule is triggered when there are multiple consecutive blank lines in the document:

Some text here


Some more text here

To fix this, delete the offending lines:

Some text here

Some more text here

Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

Multiple consecutive blank lines
Open


Severity: Info
Found in CHANGELOG.md by markdownlint

MD012 - Multiple consecutive blank lines

Tags: whitespace, blank_lines

Aliases: no-multiple-blanks

This rule is triggered when there are multiple consecutive blank lines in the document:

Some text here


Some more text here

To fix this, delete the offending lines:

Some text here

Some more text here

Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

Multiple consecutive blank lines
Open


Severity: Info
Found in CHANGELOG.md by markdownlint

MD012 - Multiple consecutive blank lines

Tags: whitespace, blank_lines

Aliases: no-multiple-blanks

This rule is triggered when there are multiple consecutive blank lines in the document:

Some text here


Some more text here

To fix this, delete the offending lines:

Some text here

Some more text here

Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

Multiple consecutive blank lines
Open


Severity: Info
Found in CHANGELOG.md by markdownlint

MD012 - Multiple consecutive blank lines

Tags: whitespace, blank_lines

Aliases: no-multiple-blanks

This rule is triggered when there are multiple consecutive blank lines in the document:

Some text here


Some more text here

To fix this, delete the offending lines:

Some text here

Some more text here

Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

Properties should be ordered bottom, height, left, right, top, width
Open

      top: calc((var(--#{$prefix}stepper-size) * .5) - (var(--#{$prefix}stepper-track-size) * .5)); // stylelint-disable-line function-disallowed-list
Severity
Category
Status
Source
Language