MatteoRagni/cas-rb

View on GitHub

Showing 20 of 1,530 total issues

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

  class Diff
    def to_ascii
      x_ascii, x_ul = @x.to_ascii
      y_ascii, y_ul = @y.to_ascii
      x_ll = x_ascii.size - x_ul
Severity: Major
Found in bin/graph2ascii.rb and 1 other location - About 3 hrs to fix
bin/graph2ascii.rb on lines 103..122

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

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 Prod
    def to_ascii
      x_ascii, x_ul = @x.to_ascii
      y_ascii, y_ul = @y.to_ascii
      x_ll = x_ascii.size - x_ul
Severity: Major
Found in bin/graph2ascii.rb and 1 other location - About 3 hrs to fix
bin/graph2ascii.rb on lines 80..99

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

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 subs_rhs(dt)
      CAS::Help.assert(dt, Hash)
      sub = dt.keys.select { |e| e == @y }[0]
      if sub
        if dt[sub].is_a? CAS::Op
Severity: Major
Found in lib/operators/bary-op.rb and 1 other location - About 1 hr to fix
lib/operators/bary-op.rb on lines 103..117

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

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 subs_lhs(dt)
      CAS::Help.assert(dt, Hash)
      sub = dt.keys.select { |e| e == @x }[0]
      if sub
        if dt[sub].is_a? CAS::Op
Severity: Major
Found in lib/operators/bary-op.rb and 1 other location - About 1 hr to fix
lib/operators/bary-op.rb on lines 124..138

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

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

  class Asin
    def to_ascii
      x_ascii, x_baseline = @x.to_ascii
      x_ascii = CAS::Ascii.normalize_ascii(x_ascii, (self.to_ascii_x_vars_complexity ? :complex : :simple))
      x_ascii = x_ascii.map.with_index do |l, i|
Severity: Major
Found in bin/graph2ascii.rb and 7 other locations - About 40 mins to fix
bin/graph2ascii.rb on lines 163..169
bin/graph2ascii.rb on lines 203..211
bin/graph2ascii.rb on lines 215..223
bin/graph2ascii.rb on lines 227..235
bin/graph2ascii.rb on lines 251..259
bin/graph2ascii.rb on lines 263..271
bin/graph2ascii.rb on lines 296..304

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

  class Log
    def to_ascii
      x_ascii, x_baseline = @x.to_ascii
      x_ascii = CAS::Ascii.normalize_ascii(x_ascii, (self.to_ascii_x_vars_complexity ? :complex : :simple))
      x_ascii = x_ascii.map.with_index do |l, i|
Severity: Major
Found in bin/graph2ascii.rb and 7 other locations - About 40 mins to fix
bin/graph2ascii.rb on lines 163..169
bin/graph2ascii.rb on lines 203..211
bin/graph2ascii.rb on lines 215..223
bin/graph2ascii.rb on lines 227..235
bin/graph2ascii.rb on lines 239..247
bin/graph2ascii.rb on lines 251..259
bin/graph2ascii.rb on lines 263..271

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

  class Sin
    def to_ascii
      x_ascii, x_baseline = @x.to_ascii
      x_ascii = CAS::Ascii.normalize_ascii(x_ascii, (self.to_ascii_x_vars_complexity ? :complex : :simple))
      x_ascii = x_ascii.map.with_index do |l, i|
Severity: Major
Found in bin/graph2ascii.rb and 7 other locations - About 40 mins to fix
bin/graph2ascii.rb on lines 163..169
bin/graph2ascii.rb on lines 215..223
bin/graph2ascii.rb on lines 227..235
bin/graph2ascii.rb on lines 239..247
bin/graph2ascii.rb on lines 251..259
bin/graph2ascii.rb on lines 263..271
bin/graph2ascii.rb on lines 296..304

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

  class Invert
    def to_ascii
      x_ascii, x_bl = @x.to_ascii
      x_ascii = CAS::Ascii.normalize_ascii(x_ascii, (self.to_ascii_x_vars_complexity ? :complex : :simple))

Severity: Major
Found in bin/graph2ascii.rb and 7 other locations - About 40 mins to fix
bin/graph2ascii.rb on lines 203..211
bin/graph2ascii.rb on lines 215..223
bin/graph2ascii.rb on lines 227..235
bin/graph2ascii.rb on lines 239..247
bin/graph2ascii.rb on lines 251..259
bin/graph2ascii.rb on lines 263..271
bin/graph2ascii.rb on lines 296..304

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

  class Cos
    def to_ascii
      x_ascii, x_baseline = @x.to_ascii
      x_ascii = CAS::Ascii.normalize_ascii(x_ascii, (self.to_ascii_x_vars_complexity ? :complex : :simple))
      x_ascii = x_ascii.map.with_index do |l, i|
Severity: Major
Found in bin/graph2ascii.rb and 7 other locations - About 40 mins to fix
bin/graph2ascii.rb on lines 163..169
bin/graph2ascii.rb on lines 203..211
bin/graph2ascii.rb on lines 227..235
bin/graph2ascii.rb on lines 239..247
bin/graph2ascii.rb on lines 251..259
bin/graph2ascii.rb on lines 263..271
bin/graph2ascii.rb on lines 296..304

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

  class Tan
    def to_ascii
      x_ascii, x_baseline = @x.to_ascii
      x_ascii = CAS::Ascii.normalize_ascii(x_ascii, (self.to_ascii_x_vars_complexity ? :complex : :simple))
      x_ascii = x_ascii.map.with_index do |l, i|
Severity: Major
Found in bin/graph2ascii.rb and 7 other locations - About 40 mins to fix
bin/graph2ascii.rb on lines 163..169
bin/graph2ascii.rb on lines 203..211
bin/graph2ascii.rb on lines 215..223
bin/graph2ascii.rb on lines 239..247
bin/graph2ascii.rb on lines 251..259
bin/graph2ascii.rb on lines 263..271
bin/graph2ascii.rb on lines 296..304

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

  class Atan
    def to_ascii
      x_ascii, x_baseline = @x.to_ascii
      x_ascii = CAS::Ascii.normalize_ascii(x_ascii, (self.to_ascii_x_vars_complexity ? :complex : :simple))
      x_ascii = x_ascii.map.with_index do |l, i|
Severity: Major
Found in bin/graph2ascii.rb and 7 other locations - About 40 mins to fix
bin/graph2ascii.rb on lines 163..169
bin/graph2ascii.rb on lines 203..211
bin/graph2ascii.rb on lines 215..223
bin/graph2ascii.rb on lines 227..235
bin/graph2ascii.rb on lines 239..247
bin/graph2ascii.rb on lines 251..259
bin/graph2ascii.rb on lines 296..304

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

  class Acos
    def to_ascii
      x_ascii, x_baseline = @x.to_ascii
      x_ascii = CAS::Ascii.normalize_ascii(x_ascii, (self.to_ascii_x_vars_complexity ? :complex : :simple))
      x_ascii = x_ascii.map.with_index do |l, i|
Severity: Major
Found in bin/graph2ascii.rb and 7 other locations - About 40 mins to fix
bin/graph2ascii.rb on lines 163..169
bin/graph2ascii.rb on lines 203..211
bin/graph2ascii.rb on lines 215..223
bin/graph2ascii.rb on lines 227..235
bin/graph2ascii.rb on lines 239..247
bin/graph2ascii.rb on lines 263..271
bin/graph2ascii.rb on lines 296..304

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

    CAS::BoxConditionLowerClosed => Proc.new {
      ["double __t_#{x.object_id} = #{x.to_c};",
       "(__t_#{x.object_id} >= #{lower.latex} && __t_#{x.object_id} < #{upper.latex})"]
Severity: Minor
Found in lib/Mr.CAS/c.rb and 3 other locations - About 25 mins to fix
lib/Mr.CAS/c.rb on lines 110..112
lib/Mr.CAS/c.rb on lines 114..116
lib/Mr.CAS/c.rb on lines 122..124

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

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

    CAS::BoxConditionUpperClosed => Proc.new {
      ["double __t_#{x.object_id} = #{x.to_c};",
       "(__t_#{x.object_id} > #{lower.latex} && __t_#{x.object_id} <= #{upper.latex})"]
Severity: Minor
Found in lib/Mr.CAS/c.rb and 3 other locations - About 25 mins to fix
lib/Mr.CAS/c.rb on lines 110..112
lib/Mr.CAS/c.rb on lines 118..120
lib/Mr.CAS/c.rb on lines 122..124

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

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

    CAS::BoxConditionOpen => Proc.new {
      ["double __t_#{x.object_id} = #{x.to_c};",
       "(__t_#{x.object_id} > #{lower.latex} && __t_#{x.object_id} < #{upper.latex})"]
Severity: Minor
Found in lib/Mr.CAS/c.rb and 3 other locations - About 25 mins to fix
lib/Mr.CAS/c.rb on lines 114..116
lib/Mr.CAS/c.rb on lines 118..120
lib/Mr.CAS/c.rb on lines 122..124

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

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

    CAS::BoxConditionClosed => Proc.new {
      ["double __t_#{x.object_id} = #{x.to_c};",
       "(__t_#{x.object_id} >= #{lower.latex} && __t_#{x.object_id} <= #{upper.latex})"]
Severity: Minor
Found in lib/Mr.CAS/c.rb and 3 other locations - About 25 mins to fix
lib/Mr.CAS/c.rb on lines 110..112
lib/Mr.CAS/c.rb on lines 114..116
lib/Mr.CAS/c.rb on lines 118..120

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

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 SmallerEqual < CAS::Condition
    # Saves some required elements
    def representative
      @cond_type = "<="
      @cond_repr = "≤"
Severity: Minor
Found in lib/functions/fnc-conditions.rb and 1 other location - About 15 mins to fix
lib/functions/fnc-conditions.rb on lines 294..310

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

    CAS::Asin   => Proc.new { |fd|
      u = @x.auto_diff(fd)
      CAS::AutoDiff::DualNumber.new Math.asin(u.x), -(Math.sin(u.x) * u.y)
Severity: Minor
Found in lib/Mr.CAS/auto-diff.rb and 1 other location - About 15 mins to fix
lib/Mr.CAS/auto-diff.rb on lines 117..119

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

  class GreaterEqual < CAS::Condition
    # Saves some required elements
    def representative
      @cond_type = ">="
      @cond_repr = "≥"
Severity: Minor
Found in lib/functions/fnc-conditions.rb and 1 other location - About 15 mins to fix
lib/functions/fnc-conditions.rb on lines 266..282

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

    CAS::Cos    => Proc.new { |fd|
      u = @x.auto_diff(fd)
      CAS::AutoDiff::DualNumber.new Math.cos(u.x), -(Math.sin(u.x) * u.y)
Severity: Minor
Found in lib/Mr.CAS/auto-diff.rb and 1 other location - About 15 mins to fix
lib/Mr.CAS/auto-diff.rb on lines 113..115

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