Showing 35 of 35 total issues
Function githubIssues
has 364 lines of code (exceeds 25 allowed). Consider refactoring. Open
function githubIssues() {
this.defaultAttrs({
issues: []
});
Function issuesExporter
has 177 lines of code (exceeds 25 allowed). Consider refactoring. Open
function issuesExporter() {
this.defaultAttrs({
customColumns: ['1 - Ready', '2 - Development', '3 - Quality Assurance']
});
Function track
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
function track() {
this.defaultAttrs({
issueItemSelector: '.issue',
issuesCount: 0,
extraAllowedTags: ['1 - Ready', '2 - Development', '3 - Quality Assurance'],
File github_issues.js
has 376 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright 2014 Thoughtworks Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Similar blocks of code found in 2 locations. Consider refactoring. Open
client.hgetall('priority:' + project, function (err, reply) {
var answer = [];
if (err) {
console.log('[ERROR] Error while retrieving priorities: ' + err);
}
- 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 128.
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
client.hgetall('columns', function (err, reply) {
var answer = [];
if (err) {
console.log('[ERROR] Error while retrieving priorities: ' + err);
}
- 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 128.
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 columnsModal
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
function columnsModal() {
this.defaultAttrs({
columnsContainerSeletor: '.columns-container'
})
this.showModal = function () {
Function columnsRender
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function columnsRender() {
this.defaultAttrs({
columnsContainer: '.board-columns'
});
Function assignMyselfToIssue
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.assignMyselfToIssue = function (ev, assignData) {
var user, issue, url;
if (assignData != undefined) {
user = assignData.user;
Function issueTemplate
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
function issueTemplate() {
var repoNames = config.getReposNames();
this.getRepoColor = function (projectName) {
var idx = repoNames.indexOf(projectName);
return 'color' + idx;
Function draggable
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.draggable = function (ev, data) {
var customColumns = _.map(data.boardColumns, function (column) {
return '.' + column;
});
var draggables = ['.backlog', '.done'].concat(customColumns);
Function prioritizationManager
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function prioritizationManager() {
this.changePriority = function (event, params) {
var newPriority;
if (Number(params.nextElement.priority) === 0) {
Function unassignMyselfToIssue
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.unassignMyselfToIssue = function (ev, assignData) {
var user, issue, url, currentData;
if (assignData != undefined) {
user = assignData.user;
issue = assignData.issue;
Function component
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function component() {
this.setUp = function () {
var context = this;
$("#create_issue").click(function () {
Function columnsManager
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function columnsManager() {
this.retrieve = function () {
$(document).trigger('ui:blockUI');
var that = this;
var defaultColumns = [{
Function fetchIssues
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.fetchIssues = function (ev, data) {
$(document).trigger('ui:blockUI');
data.page = ('page' in data) ? (data.page + 1) : 1;
Function permissionsGateway
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function permissionsGateway() {
var that = this;
this.defaultAttrs({
});
Function receive
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
receive: function (event, ui) {
var label, url, oldLabel, state;
if (!this.getCurrentAuthToken()) {
this.trigger(document, 'ui:needs:githubUser');
Function renderColumns
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.renderColumns = function (event, data) {
this.cleanColumns();
var columns = _.sortBy(data.columns, function (column) {
return Number(column['order']);
Function exports
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (config) {
'use strict';
config.set({
autoWatch: true,