Similar blocks of code found in 2 locations. Consider refactoring. Open
User.create!(email: 'hunter.johnson222001@gmail.com',
password: 'openhouse',
first_name: 'Hunter',
last_name: 'Johnson',
personal_description: "Hi, I'm Hunter!",
- Read upRead up
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 75.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
User.create!(email: 'kyle.peyton220268@gmail.com',
password: 'openhouse',
first_name: 'Kyle',
last_name: 'Peyton',
personal_description: "Hi, I'm Kyle!",
- Read upRead up
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 75.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
User.create!(email: 'aravind.kumar298640@gmail.com',
password: 'openhouse',
first_name: 'Aravind',
last_name: 'Kumar',
personal_description: "Hi, I'm Aravind!",
- Read upRead up
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 73.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
User.create!(email: 'andrew.robles3000868@gmail.com',
password: 'openhouse',
first_name: 'Andrew',
last_name: 'Robles',
personal_description: "Hi, I'm Andrew!",
- Read upRead up
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 73.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
available_time_start: "09:00",
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Line is too long. [687/80] Open
house_description: 'Hi, my name is Aravind, and I am a photographer living in Oakland. I majorly work from home, but I might have to take some photos in the city during the day. Located in a quiet, private house close in the heart of Oakland, my space is well suited to those who seek a tranquil escape from the city. Multiple working areas including a patio, roof terrace, and kitchen with multiple seating areas. There are 4 seats in the kitchen and 4 more in the studio downstairs. In case nobody is there, I strongly encourage you to try out playing some notes on the piano upstairs! First two vehicles will have free parking, unlimited coffee beans, T2 tea, and WiFi.',
- Exclude checks
Line is too long. [383/80] Open
house_description: "I'm running a hedge fund in my garage and am looking for people to co-work with. I have monitors and enough seating space at a great table. Free Colombian coffee and ultra-fast WiFi! If you're doing some artistic activity, there is some space here to paint. Just make sure to contact me beforehand to make that happen! Come live the american dream!",
- Exclude checks
Line is too long. [85/80] Open
cloud_profile_picture_id: 'v1512374833/angello-lopez-138917_oocgtu.jpg',
- Exclude checks
Line is too long. [85/80] Open
cloud_profile_picture_id: 'v1512374835/aravind-kumar-298640_clpoy1.jpg',
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
price: "10",
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
available_time_end: "17:00",
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
available_time_end: "17:00",
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Line is too long. [192/80] Open
Large wooden table which can sit up to 6 people, comfortable corner sofa with coffee table and TV screen. Feel free to use the printer if needed. We also have fast, reliable wifi.
- Exclude checks
Line is too long. [109/80] Open
amenity_list: AmenityList.create!(wifi: true, coffee: true, printer: true, computer_desk: true),
- Exclude checks
Line is too long. [441/80] Open
house_description: 'I have a very spacious living room with enough space for 4, with extra seating/desk space available if required. It is very well lit and warm, with a TV package and a projector if required. It is very quiet with infrequent traffic noise. There is a very big kitchen with a kettle, and a fridge with an ice maker and distilled water plus cooking facilities, if required. Im looking forward to welcoming you!',
- Exclude checks
Line is too long. [150/80] Open
amenity_list: AmenityList.create!(wifi: true, coffee: true, computer_desk: true, projector: true, kitchen_access: true, microwave: true),
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
price: "25",
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
available_time_end: "17:00",
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
price: "30",
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Line is too long. [82/80] Open
cloud_house_picture_id: 'v1512374828/tatiana-lapina-7683_uzwu8j.jpg')
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
available_time_start: "09:00",
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Line is too long. [161/80] Open
house_description: "Come to experience a very productive and peaceful working environment. My flat is close to the 19th street Oakland BART Station.
- Exclude checks
Line is too long. [83/80] Open
Unlimited tea & coffee, and there are often cakes or chocolate around!
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
price: "20",
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
available_time_end: "17:00",
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
available_time_start: "09:00",
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Line is too long. [162/80] Open
Fantastic natural light all day long. The living room benefits from floor-to-ceiling windows that can be opened to make you feel like you're outside.
- Exclude checks
Line is too long. [84/80] Open
cloud_house_picture_id: 'v1512374840/jay-wennington-393218_kcvvpk.jpg')
- Exclude checks
Line is too long. [83/80] Open
cloud_profile_picture_id: 'v1512375560/kyle-peyton-220268_ryazq9.jpg',
- Exclude checks
Line is too long. [82/80] Open
cloud_house_picture_id: 'v1512375566/mounzer-awad-348688_pzdyhp.jpg')
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
available_time_start: "09:00",
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
price: "22",
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Line is too long. [85/80] Open
cloud_profile_picture_id: 'v1512374837/andrew-robles-300868_tn1uo5.jpg',
- Exclude checks
Line is too long. [133/80] Open
amenity_list: AmenityList.create!(wifi: true, coffee: true, computer_desk: true, kitchen_access: true, microwave: true),
- Exclude checks
Line is too long. [96/80] Open
Message.create!(body: 'hello. This is a message.', conversation_id: conversation.id, user_id: 1)
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
available_time_start: "09:00",
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Line is too long. [107/80] Open
amenity_list: AmenityList.create!(wifi: true, coffee: true, computer_desk: true, piano: true),
- Exclude checks
Line is too long. [568/80] Open
house_description: "Hi! I am a software engineer freelancing and working at home most of the time. I have a large and quiet kitchen with a dedicated working desk in a big, newly-refurbished Victorian house. Private, secluded, and with natural light. Five minutes' walk from MacArthur BART Station and parking is easy. It would suit around three people. Feel free to use the renovated and fully equipped kitchen! Otherwise, there are cafes and restaurants a short five minute walk away on Telegraph. Keep in touch should you need any further information!",
- Exclude checks
Line is too long. [84/80] Open
cloud_house_picture_id: 'v1512374827/sophia-baboolal-86214_yemad1.jpg')
- Exclude checks
Line is too long. [86/80] Open
cloud_profile_picture_id: 'v1512374827/hunter-johnson-222001_bsxahk.jpg',
- Exclude checks
Line is too long. [125/80] Open
amenity_list: AmenityList.create!(wifi: true, coffee: true, computer_desk: true, garage: true, art_space: true),
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
available_time_end: "17:00",
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"