eturk/marvin

View on GitHub

Showing 25 of 25 total issues

File parser_spec.rb has 413 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require 'spec_helper'

describe Marvin::Parser do
  it 'inherits from RLTK::Parser' do
    expect(subject).to be_a RLTK::Parser
Severity: Minor
Found in spec/lib/marvin/parser_spec.rb - About 5 hrs to fix

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

          context 'addition' do
            let(:ast) { get_ast('4 + 4') }
            let(:addition) { ast.first }
    
            it 'creates an Addition node' do
    Severity: Major
    Found in spec/lib/marvin/parser_spec.rb and 7 other locations - About 1 hr to fix
    spec/lib/marvin/parser_spec.rb on lines 35..56
    spec/lib/marvin/parser_spec.rb on lines 60..81
    spec/lib/marvin/parser_spec.rb on lines 85..106
    spec/lib/marvin/parser_spec.rb on lines 429..450
    spec/lib/marvin/parser_spec.rb on lines 454..475
    spec/lib/marvin/parser_spec.rb on lines 479..500
    spec/lib/marvin/parser_spec.rb on lines 504..525

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

    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

          context 'division' do
            let(:ast) { get_ast('4 / 4') }
            let(:division) { ast.first }
    
            it 'creates an Division node' do
    Severity: Major
    Found in spec/lib/marvin/parser_spec.rb and 7 other locations - About 1 hr to fix
    spec/lib/marvin/parser_spec.rb on lines 10..31
    spec/lib/marvin/parser_spec.rb on lines 35..56
    spec/lib/marvin/parser_spec.rb on lines 60..81
    spec/lib/marvin/parser_spec.rb on lines 429..450
    spec/lib/marvin/parser_spec.rb on lines 454..475
    spec/lib/marvin/parser_spec.rb on lines 479..500
    spec/lib/marvin/parser_spec.rb on lines 504..525

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

    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

          context 'not equal to' do
            let(:ast) { get_ast('4 != 4') }
            let(:not_equal_to) { ast.first }
    
            it 'creates an NotEqualTo node' do
    Severity: Major
    Found in spec/lib/marvin/parser_spec.rb and 7 other locations - About 1 hr to fix
    spec/lib/marvin/parser_spec.rb on lines 10..31
    spec/lib/marvin/parser_spec.rb on lines 35..56
    spec/lib/marvin/parser_spec.rb on lines 60..81
    spec/lib/marvin/parser_spec.rb on lines 85..106
    spec/lib/marvin/parser_spec.rb on lines 429..450
    spec/lib/marvin/parser_spec.rb on lines 479..500
    spec/lib/marvin/parser_spec.rb on lines 504..525

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

    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

          context 'greater than' do
            let(:ast) { get_ast('4 > 4') }
            let(:greater_than) { ast.first }
    
            it 'creates an LessThan node' do
    Severity: Major
    Found in spec/lib/marvin/parser_spec.rb and 7 other locations - About 1 hr to fix
    spec/lib/marvin/parser_spec.rb on lines 10..31
    spec/lib/marvin/parser_spec.rb on lines 35..56
    spec/lib/marvin/parser_spec.rb on lines 60..81
    spec/lib/marvin/parser_spec.rb on lines 85..106
    spec/lib/marvin/parser_spec.rb on lines 429..450
    spec/lib/marvin/parser_spec.rb on lines 454..475
    spec/lib/marvin/parser_spec.rb on lines 479..500

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

    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

          context 'multiplication' do
            let(:ast) { get_ast('4 * 4') }
            let(:multiplication) { ast.first }
    
            it 'creates an Multiplication node' do
    Severity: Major
    Found in spec/lib/marvin/parser_spec.rb and 7 other locations - About 1 hr to fix
    spec/lib/marvin/parser_spec.rb on lines 10..31
    spec/lib/marvin/parser_spec.rb on lines 35..56
    spec/lib/marvin/parser_spec.rb on lines 85..106
    spec/lib/marvin/parser_spec.rb on lines 429..450
    spec/lib/marvin/parser_spec.rb on lines 454..475
    spec/lib/marvin/parser_spec.rb on lines 479..500
    spec/lib/marvin/parser_spec.rb on lines 504..525

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

    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

          context 'subtraction' do
            let(:ast) { get_ast('4 - 4') }
            let(:subtraction) { ast.first }
    
            it 'creates an Subtraction node' do
    Severity: Major
    Found in spec/lib/marvin/parser_spec.rb and 7 other locations - About 1 hr to fix
    spec/lib/marvin/parser_spec.rb on lines 10..31
    spec/lib/marvin/parser_spec.rb on lines 60..81
    spec/lib/marvin/parser_spec.rb on lines 85..106
    spec/lib/marvin/parser_spec.rb on lines 429..450
    spec/lib/marvin/parser_spec.rb on lines 454..475
    spec/lib/marvin/parser_spec.rb on lines 479..500
    spec/lib/marvin/parser_spec.rb on lines 504..525

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

    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

          context 'equal to' do
            let(:ast) { get_ast('4 == 4') }
            let(:equal_to) { ast.first }
    
            it 'creates an EqualTo node' do
    Severity: Major
    Found in spec/lib/marvin/parser_spec.rb and 7 other locations - About 1 hr to fix
    spec/lib/marvin/parser_spec.rb on lines 10..31
    spec/lib/marvin/parser_spec.rb on lines 35..56
    spec/lib/marvin/parser_spec.rb on lines 60..81
    spec/lib/marvin/parser_spec.rb on lines 85..106
    spec/lib/marvin/parser_spec.rb on lines 454..475
    spec/lib/marvin/parser_spec.rb on lines 479..500
    spec/lib/marvin/parser_spec.rb on lines 504..525

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

    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

          context 'less than' do
            let(:ast) { get_ast('4 < 4') }
            let(:less_than) { ast.first }
    
            it 'creates an LessThan node' do
    Severity: Major
    Found in spec/lib/marvin/parser_spec.rb and 7 other locations - About 1 hr to fix
    spec/lib/marvin/parser_spec.rb on lines 10..31
    spec/lib/marvin/parser_spec.rb on lines 35..56
    spec/lib/marvin/parser_spec.rb on lines 60..81
    spec/lib/marvin/parser_spec.rb on lines 85..106
    spec/lib/marvin/parser_spec.rb on lines 429..450
    spec/lib/marvin/parser_spec.rb on lines 454..475
    spec/lib/marvin/parser_spec.rb on lines 504..525

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

    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

    describe Marvin::AST::Test do
      let(:node) do
        Marvin::AST::Test.new(
          Marvin::AST::Integer.new(4),
          Marvin::AST::Integer.new(4)
    Severity: Major
    Found in spec/lib/marvin/ast/test_spec.rb and 2 other locations - About 1 hr to fix
    spec/lib/marvin/ast/arithmetic_spec.rb on lines 3..21
    spec/lib/marvin/ast/divison_spec.rb on lines 3..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 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 3 locations. Consider refactoring.
    Open

    describe Marvin::AST::Arithmetic do
      let(:node) do
        Marvin::AST::Arithmetic.new(
          Marvin::AST::Integer.new(4),
          Marvin::AST::Integer.new(4)
    Severity: Major
    Found in spec/lib/marvin/ast/arithmetic_spec.rb and 2 other locations - About 1 hr to fix
    spec/lib/marvin/ast/divison_spec.rb on lines 3..21
    spec/lib/marvin/ast/test_spec.rb on lines 3..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 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 3 locations. Consider refactoring.
    Open

    describe Marvin::AST::Division do
      let(:node) do
        Marvin::AST::Division.new(
          Marvin::AST::Integer.new(4),
          Marvin::AST::Integer.new(4)
    Severity: Major
    Found in spec/lib/marvin/ast/divison_spec.rb and 2 other locations - About 1 hr to fix
    spec/lib/marvin/ast/arithmetic_spec.rb on lines 3..21
    spec/lib/marvin/ast/test_spec.rb on lines 3..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 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

        describe 'integer' do
          let(:ast) { get_ast('4') }
          let(:integer) { ast.first }
    
          it 'creates an Integer node' do
    Severity: Minor
    Found in spec/lib/marvin/parser_spec.rb and 1 other location - About 50 mins to fix
    spec/lib/marvin/parser_spec.rb on lines 229..242

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

    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

        describe 'float' do
          let(:ast) { get_ast('4.0') }
          let(:float) { ast.first }
    
          it 'creates a Float node' do
    Severity: Minor
    Found in spec/lib/marvin/parser_spec.rb and 1 other location - About 50 mins to fix
    spec/lib/marvin/parser_spec.rb on lines 336..349

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

    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

          clause('expression T_BOOLOP expression') do |left, op, right|
            case op
            when :==
              EqualTo.new(left, right)
            when :!=
    Severity: Minor
    Found in lib/marvin/parser.rb and 1 other location - About 35 mins to fix
    lib/marvin/parser.rb on lines 100..109

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

    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

          clause('expression T_INTOP expression') do |left, op, right|
            case op
            when :+
              Addition.new(left, right)
            when :-
    Severity: Minor
    Found in lib/marvin/parser.rb and 1 other location - About 35 mins to fix
    lib/marvin/parser.rb on lines 81..90

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

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

    describe Marvin::AST::NotEqualTo do
      let(:node) do
        Marvin::AST::NotEqualTo.new(
          Marvin::AST::Integer.new(4),
          Marvin::AST::Integer.new(4)
    Severity: Major
    Found in spec/lib/marvin/ast/not_equal_to_spec.rb and 6 other locations - About 30 mins to fix
    spec/lib/marvin/ast/addition_spec.rb on lines 3..13
    spec/lib/marvin/ast/equal_to_spec.rb on lines 3..13
    spec/lib/marvin/ast/greater_than_spec.rb on lines 3..13
    spec/lib/marvin/ast/less_than_spec.rb on lines 3..13
    spec/lib/marvin/ast/multiplication_spec.rb on lines 3..13
    spec/lib/marvin/ast/subtraction_spec.rb on lines 3..13

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

    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

    describe Marvin::AST::Float do
      let(:node) do
        Marvin::AST::Float.new(4.0)
      end
    
    
    Severity: Minor
    Found in spec/lib/marvin/ast/float_spec.rb and 1 other location - About 30 mins to fix
    spec/lib/marvin/ast/integer_spec.rb on lines 3..13

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

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

    describe Marvin::AST::LessThan do
      let(:node) do
        Marvin::AST::LessThan.new(
          Marvin::AST::Integer.new(4),
          Marvin::AST::Integer.new(4)
    Severity: Major
    Found in spec/lib/marvin/ast/less_than_spec.rb and 6 other locations - About 30 mins to fix
    spec/lib/marvin/ast/addition_spec.rb on lines 3..13
    spec/lib/marvin/ast/equal_to_spec.rb on lines 3..13
    spec/lib/marvin/ast/greater_than_spec.rb on lines 3..13
    spec/lib/marvin/ast/multiplication_spec.rb on lines 3..13
    spec/lib/marvin/ast/not_equal_to_spec.rb on lines 3..13
    spec/lib/marvin/ast/subtraction_spec.rb on lines 3..13

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

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

    describe Marvin::AST::EqualTo do
      let(:node) do
        Marvin::AST::EqualTo.new(
          Marvin::AST::Integer.new(4),
          Marvin::AST::Integer.new(4)
    Severity: Major
    Found in spec/lib/marvin/ast/equal_to_spec.rb and 6 other locations - About 30 mins to fix
    spec/lib/marvin/ast/addition_spec.rb on lines 3..13
    spec/lib/marvin/ast/greater_than_spec.rb on lines 3..13
    spec/lib/marvin/ast/less_than_spec.rb on lines 3..13
    spec/lib/marvin/ast/multiplication_spec.rb on lines 3..13
    spec/lib/marvin/ast/not_equal_to_spec.rb on lines 3..13
    spec/lib/marvin/ast/subtraction_spec.rb on lines 3..13

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

    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