voormedia/rails-erd

View on GitHub
examples/applications/spree/schema.rb

Summary

Maintainability
C
1 day
Test Coverage

File schema.rb has 505 lines of code (exceeds 250 allowed). Consider refactoring.
Open

ActiveRecord::Schema.define(:version => 20100923162011) do

  create_table "addresses", :force => true do |t|
    t.string   "firstname"
    t.string   "lastname"
Severity: Major
Found in examples/applications/spree/schema.rb - About 1 day to fix

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

      create_table "addresses", :force => true do |t|
        t.string   "firstname"
        t.string   "lastname"
        t.string   "address1"
        t.string   "address2"
    Severity: Minor
    Found in examples/applications/spree/schema.rb and 1 other location - About 1 hr to fix
    examples/applications/event_forms/schema.rb on lines 12..25

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

    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

      create_table "state_events", :force => true do |t|
        t.integer  "stateful_id"
        t.integer  "user_id"
        t.string   "name"
        t.datetime "created_at"
    Severity: Minor
    Found in examples/applications/spree/schema.rb and 3 other locations - About 25 mins to fix
    examples/applications/event_forms/schema.rb on lines 2..9
    examples/applications/event_forms/schema.rb on lines 28..35
    examples/applications/refinery/schema.rb on lines 90..97

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

      create_table "open_id_authentication_associations", :force => true do |t|
        t.integer "issued"
        t.integer "lifetime"
        t.string  "handle"
        t.string  "assoc_type"
    Severity: Minor
    Found in examples/applications/spree/schema.rb and 6 other locations - About 15 mins to fix
    examples/applications/event_forms/schema.rb on lines 82..88
    examples/applications/gemcutter/schema.rb on lines 3..9
    examples/applications/refinery/schema.rb on lines 35..41
    examples/applications/spree/schema.rb on lines 188..194
    examples/applications/spree/schema.rb on lines 340..346
    examples/applications/typo/schema.rb on lines 13..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 26.

    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

      create_table "option_values", :force => true do |t|
        t.integer  "option_type_id"
        t.string   "name"
        t.integer  "position"
        t.string   "presentation"
    Severity: Minor
    Found in examples/applications/spree/schema.rb and 6 other locations - About 15 mins to fix
    examples/applications/event_forms/schema.rb on lines 82..88
    examples/applications/gemcutter/schema.rb on lines 3..9
    examples/applications/refinery/schema.rb on lines 35..41
    examples/applications/spree/schema.rb on lines 161..167
    examples/applications/spree/schema.rb on lines 340..346
    examples/applications/typo/schema.rb on lines 13..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 26.

    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

      create_table "promotion_rules", :force => true do |t|
        t.integer  "promotion_id"
        t.integer  "user_id"
        t.integer  "product_group_id"
        t.datetime "created_at"
    Severity: Minor
    Found in examples/applications/spree/schema.rb and 6 other locations - About 15 mins to fix
    examples/applications/event_forms/schema.rb on lines 82..88
    examples/applications/gemcutter/schema.rb on lines 3..9
    examples/applications/refinery/schema.rb on lines 35..41
    examples/applications/spree/schema.rb on lines 161..167
    examples/applications/spree/schema.rb on lines 188..194
    examples/applications/typo/schema.rb on lines 13..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 26.

    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

    There are no issues that match your filters.

    Category
    Status