Showing 29 of 29 total issues
Function createHTML
has 418 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createHTML(data, cb) {
const presetOptions = {
shelly: {
title: 'ShellyPalmer',
url: 'https://www.shellypalmer.com',
File createHTML.js
has 470 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
const moment = require('moment');
function button({
Function render
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
isLoading,
html,
error,
Similar blocks of code found in 2 locations. Consider refactoring. Open
<Block
flex='1'
marginBottom='.5rem'
marginRight='.5rem'
>
- 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 116.
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
<Block
flex='1'
marginBottom='.5rem'
marginRight='.5rem'
>
- 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 116.
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
Function render
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { elements, actions, connectDropTarget, ...other } = this.props
return connectDropTarget(
<Block width='600px'>
{elements.map((card, i) => {
Function render
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { meta, metaData } = this.props;
return (
<Block>
<Block
Function api
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
function api (__DEV__) {
const server = express()
server.disable('x-powered-by')
server.use(helmet())
server.use(bodyParser.urlencoded({ extended: true }))
Function render
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { id, title, content, author, url, edit, extract } = this.props
return (
<Block>
<Row>
Function render
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
return (
<Col>
<Row
height={L.gridUnit * 6.25}
Similar blocks of code found in 2 locations. Consider refactoring. Open
<Input
placeholder="Enter the subject line...(keep it short!)"
value={metaData.subject}
onChange={(e) => meta({ subject: e.target.value })}
style={{
- 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
<select
placeholder="Preset"
value={metaData.preset}
onChange={(e) => meta({ preset: e.target.value })}
style={{
- 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
Function render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { id, hasCopied, text, onCopy, ...other } = this.props
return (
<div
id={id}
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { style, rows, ...rest } = this.props;
const border = this.state.focused
? '1px solid #a6aebb'
: '1px solid #edeff1';
Function render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { children, onClick, small, ...rest } = this.props
return (
<div
role='button'
Function configureStore
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function configureStore () {
const persistedState = loadState()
const middlewares = [thunk.withExtraArgument({ axios })]
const store = createStore(
Function render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { card, isDragging, connectDragSource, connectDropTarget, edit, destroy, extract } = this.props
const opacity = isDragging ? 0 : 1
return connectDragSource(connectDropTarget(
Function start
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function start () {
const rabbit = jackrabbit(RABBIT_URL)
const exchange = rabbit.default()
logger.log({ type: 'info', message: 'serving premail service' })
Consider simplifying this complex logical expression. Open
if (e) {
const error_code = e && e.data && (e.data.error_code || 500);
const error_message =
e && e.data && (e.data.error_message || 'Something went wrong');
const data = {
Similar blocks of code found in 3 locations. Consider refactoring. Open
{card.kind === 'text' ? <Text id={card.id} content={card.content} edit={edit} /> : null}
- 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 52.
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