Showing 12 of 82 total issues
Function exports
has 633 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (grunt) {
var localConfig;
try {
localConfig = require('./server/config/ennvironment');
} catch(e) {
File Gruntfile.js
has 636 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Generated on 2015-01-19 using generator-angular-fullstack 2.0.13
'use strict';
module.exports = function (grunt) {
var localConfig;
File retrospective.spec.js
has 507 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
var config = require('../../server/config/environment');
describe('Retrospective View', function() {
var page;
File main.spec.js
has 415 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
var should = require('should');
var io = require('socket.io-client');
var _ = require('lodash');
File retrospective.controller.spec.js
has 268 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
describe('Controller: RetrospectiveCtrl', function () {
// load the controller's module
Function MainPage
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var MainPage = function() {
this.container = element(by.css('#container'));
this.form = this.container.element(by.css('form[name="startSessionForm"]'));
this.usernameInput = this.container.element(by.model('currentUser.username'));
Function exports
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
Function MainPage
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var MainPage = function() {
this.container = element(by.css('#container'));
this.form = this.container.element(by.css('form[name="startSessionForm"]'));
this.usernameInput = this.container.element(by.model('currentUser.username'));
Function init
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.init = function(){
$scope.currentUser = userService.getUser(); //get user name and type
$scope.url = $location.$$absUrl;// Url to share with the team
$scope.sessionId = $routeParams.id;
$scope.inputMode = {};
Function exports
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(app) {
var env = app.get('env');
app.locals.FACEBOOK_APP_ID= config.FACEBOOK_APP_ID;
app.locals.GOOGLE_ANALYTICS_ID= config.GOOGLE_ANALYTICS_ID;
Function onLeaveSession
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
function onLeaveSession(socket){
var match, union;
var roomId = _.findKey(rooms, function(room){//Find user in rooms
union = _.union(room.players, room.moderators);
match = _.findWhere(union, {id: socket.id});
- 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 onJoinSession
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
function onJoinSession(io, socket, data) {
if(!rooms[data.roomId]){ return socket.emit('errorMsg', {message: "Session does not exist"}); }
if(!data.username || !data.type){ return socket.emit('errorMsg', {message: "Missing information"}); }
socket.join(data.roomId);
- 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"