Showing 38 of 50 total issues
Function ProjListCtrl
has 247 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ProjListCtrl(project,$rootScope,$scope,updateTask,$q,$timeout,$modal,addTaskToProject,deleteTask,socket,p){
var self = this,
channel = p.subscribe('task_event');
File app.js
has 439 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
var app = window.angular.module('app',[
'ngRoute','ipCookie','ngResource','app.socket',
'ui.bootstrap','app.routes','app.projects',
Function TaskCtrl
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function TaskCtrl(project,task,activeTasks,$routeParams,$route,$location,$window,$interpolate,$scope){
var self = this,
projectUrlFunc = $interpolate('/app/project/{{ pid }}'),
changeFunc = $interpolate('/app/project/{{ pid }}/{{ tid }}');
File list.js
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* global angular,getProjFromRoot */
var app = angular.module('app.projects.list',[]);
app.controller('ProjListCtrl',ProjListCtrl)
.factory('updateTask',updateTask)
TestTaskApiTestCase
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class TestTaskApiTestCase(BaseCase):
maxDiff = None
def url_for(self,*args,**kwargs):
rtn = ''
Function post
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
Open
def post(self):
default_result = jsonify(success=False,error='there was an error')
updated = False
result = None
self._process_post()
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function mainTest
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
mainTest = function(){ /*var document = require('jsdom').jsdom('<html><head></head><body></body></html>'), window = document.defaultView; require('angular'); require('./socket.io.js'); window.io = require('socket.io-client');*/
require('./flask_tasks/static/js/app.js');
require('./flask_tasks/static/js/app/projects.js');
require('./flask_tasks/static/js/app/tasks.js');
require('./flask_tasks/static/js/app/routes.js');
Function routeConfigFn
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function routeConfigFn($routeProvider,$locationProvider){
$routeProvider.when('/app',{
templateUrl:'/static/partials/home.html',
resolve:{
projects:['projectManager',function(projectManager){
Function bsCheckBox
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function bsCheckBox(){
return {
restrict:"A",
require:"?^ngModel",
link:bsCheckBoxLinkFn,
Function ProjListCtrl
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
Open
function ProjListCtrl(project,$rootScope,$scope,updateTask,$q,$timeout,$modal,addTaskToProject,deleteTask,socket,p){
var self = this,
channel = p.subscribe('task_event');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File projects.js
has 266 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
var app = angular.module('app.projects',[]);
app.factory('projectFactory',projectFactory)
Function AddProjCtrl
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function AddProjCtrl(projects,deleteProject,removeProjectFromRoot,addProjectToRoot,addProject,$modal,$scope,projectPage){
var self = this;
self.projects = projects;
self.project = {};
Function bsCheckBoxLinkFn
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function bsCheckBoxLinkFn(scope,ele,attrs,ctrl){
console.log(arguments);
var cls = ele.attr('class'),
newEl = angular.element(document.createElement('span'))
.addClass('fa')
Function ProjCtrl
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ProjCtrl(project,$location,$interpolate,sortByPriority,completeTask,$window,$q,$rootScope){
var self = this,
urlFunc = $interpolate('/app/project/{{ pid }}/{{ tid }}');
self.project = project;
Function QuickAddCtrl
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function QuickAddCtrl($scope,$modalInstance,addTaskToProject,$routeParams,$rootScope,project,$location,p){
var self = this,
channel = p.subscribe('task_event');
self.project = project;
Function MainCtrl
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function MainCtrl(socket,$rootScope,$scope){
var self = this;
$scope.priority_values = {
'1':false,
'2':false,
Function ProjListCtrl
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function ProjListCtrl(project,$rootScope,$scope,updateTask,$q,$timeout,$modal,addTaskToProject,deleteTask,socket,p){
Function save
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function save(){
if(!self.changedItems){
return;
}
var promises = [],
Function TaskCtrl
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function TaskCtrl(project,task,activeTasks,$routeParams,$route,$location,$window,$interpolate,$scope){
Function hoverIcon
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function hoverIcon(){
return {
restrict:"E",
scope:{
icon:"@"