Showing 108 of 108 total issues
Similar blocks of code found in 3 locations. Consider refactoring. Open
<div className="modal-header">
<button type="button" className="close" data-dismiss="modal"><span>×</span></button>
<h4 className="modal-title">Something Went Wrong</h4>
</div>
- 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 74.
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 3 locations. Consider refactoring. Open
<div className="modal-header">
<button type="button" className="close" data-dismiss="modal"><span>×</span></button>
<h4 className="modal-title">Confirm Deletion</h4>
</div>
- 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 74.
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 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
var controls = [];
for (var i = 0; i < this.state.preset.layouts.length; i++) {
controls.push(
<LayoutSelector update={this.update} id={i}/>
Function purge
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
purge: function () {
_state = {
currentLayout: 0,
changer: {
key: '',
Function render
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
return (
<div className="preset">
<div className="jumbotron header">
<div className="container">
Function render
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
return (
<div className="preset">
<div className="jumbotron header">
<div className="container">
Function render
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
return (
<div>
<nav className="navbar navbar-default navbar-fixed-top navbar-inverse">
<div className="container">
Function render
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
var presetList = [];
for (var i = 0; i < this.state.presets.length; i++) {
presetList.push(
<Item id={this.state.presets[i]}/>
Similar blocks of code found in 2 locations. Consider refactoring. Open
case constants.CYCLE_ADD_ITEM:
_state.changer = {mode: 'cycle', data: [], key: action.id, view: -1};
store.emitChange();
$('#bind-changer').modal('show');
break;
- 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 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
- 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
case constants.KEYBINDING_CHANGER_OPEN:
_state.changer = {mode: 'bind', data: [], key: action.id, view: -1};
store.emitChange();
$('#bind-changer').modal('show');
break;
- 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 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
- 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 renderContent
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderContent: function (p, classNames, options) {
var button = options.interactive ?
(
<button onClick={this.remove} type="button" className="btn btn-danger btn-block">
<i className="glyphicon glyphicon-trash"/> Remove
Similar blocks of code found in 2 locations. Consider refactoring. Open
<div className="col-sm-6">
<input type="text" value={this.state.preset.title} onChange={this.changeTitle} className="form-control"/>
</div>
- 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 65.
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
<div className="col-sm-6">
<textarea className="form-control monospace" value={this.state.preset.description} onChange={this.changeDescription} rows="20"/>
</div>
- 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 65.
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: function () {
var commands = [];
for (var i = 0; i < this.props.data.length; i++) {
commands.push(
<Command key={i} data={this.props.data[i]} id={i} cycle={this.props.id} action={true}/>
Function renderMain
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderMain: function () {
var content = [];
viewData.forEach(function (node, index) {
var _onClick = function () {
if (node.action) {
Function render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
return (
<div className="presets">
<div className="jumbotron header">
<div className="container">
Function render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
var action;
if (this.props.action) {
action = (
<td style={{width: '123px'}}>
Function render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
return (
<div className="layouts margin-fix">
<div className="jumbotron header">
<div className="container">
Function render
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
var legend = [
['layout', 'duplicate', 'Layout'],
['other', 'question-sign', 'Other'],
['ability', 'font', 'Ability'],
Function onload
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.onload = function () {
ReactDOM.render((
<ReactRouter.Router>
<ReactRouter.Redirect from="/" to="home"/>
<ReactRouter.Route path="/" component={Layout}>