Showing 181 of 353 total issues
Function SlugsContoller
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function SlugsContoller(jugenden, gruppen, teams, NgTableParams, $state, $scope, auth, veranstaltungen) {
const vm = this;
vm.loading = true;
const originalTooltipText = 'Klick zum Kopieren';
Function exports
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function () {
const logger = require('winston').loggers.get('apiSpiele');
const express = require('express');
const router = express.Router();
const cls = require('../config/cls.js');
Function SpielController
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function SpielController($state, aktivesSpiel, spiel, spielModus, auth, $stateParams, toastr, spielplanEnabled) {
const vm = this;
vm.loading = true;
if (!aktivesSpiel.complex || !aktivesSpiel.complex.hz1 || !aktivesSpiel.complex.hz2 || !aktivesSpiel.complex.hz3) {
Function exports
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (secret) {
const mongoose = require('mongoose');
const crypto = require('crypto');
const jwt = require('jsonwebtoken');
const moment = require('moment');
Function AddZwischengruppeController
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function AddZwischengruppeController($scope, $uibModalInstance, gewJugend, gruppe, $rootScope, $timeout) {
const vm = this;
if($rootScope.spielplanEnabled) {
$timeout(function () {
Function exports
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
Open
module.exports = function (sendgrid, env, url, disableMails) {
const logger = require('winston').loggers.get('mailGenerator');
const _ = require('lodash');
const constants = require('./constants.js');
const ejs = require('ejs');
- 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 generateZwischenGruppen
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function generateZwischenGruppen(gruppen, jugendid, maxTeamsAdvance, callback) {
const gruppenLength = gruppen.length;
const relevantGruppen = [];
if (gruppenLength <= 2) {
return callback(null, []);
Function TurnierImportController
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function TurnierImportController($scope, $uibModalInstance, importedJugend, gewJugend, jugend) {
const vm = this;
_.extend(vm, {
jugend: gewJugend,
Function exports
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
Open
module.exports = function (payload, cb) {
const properties = helper.configureProperties(payload);
const plaetze = properties.plaetze,
zeiten = properties.zeiten,
gruppen = properties.gruppen,
- 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 JugendPanelController
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function JugendPanelController(auth, gruppe, jugend, GruppeEditierenDialog, spielplan, $state, $scope, BestaetigenDialog, AddZwischengruppeDialog, $rootScope) {
const vm = this;
vm.loading = true;
_.extend(vm, {
Function SpieleDruckController
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function SpieleDruckController($state, spiele, spiel, $scope, $rootScope, mannschaftslisten) {
const vm = this;
vm.loading = true;
vm.mode = 'all';
Function exports
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (sendgrid, env, url, disableEmails) {
const logger = require('winston').loggers.get('apiEmail');
const express = require('express');
const router = express.Router();
Function sortTeams
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function sortTeams(teams, key, spielModel, gruppe, cb) {
if (!key) {
key = 'all';
}
Function fillSpiele
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function fillSpiele(callback) {
logger.verbose('Filling Spiele with Team Infos');
const beachEventID = cls.getBeachEventID();
const clsSession = cls.getNamespace();
return clsSession.run(function () {
Function TeamAbonnierenController
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function TeamAbonnierenController($state, $uibModalInstance, gewTeam, email, $rootScope, $timeout) {
const vm = this;
vm.loading = true;
const emptymessage = {
text: '',
Function GruppeEditierenController
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function GruppeEditierenController($state, $uibModalInstance, team, teamPromise, gewGruppe, spielplan, TeamEditierenDialog, BestaetigenDialog, $scope, anmeldung) {
const vm = this;
vm.loading = true;
_.extend(vm, {
Function fill
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
TeamSchema.methods.fill = function(callback) {
const team = this;
const beachEventID = cls.getBeachEventID();
const clsSession = cls.getNamespace();
const results = {
Function exports
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (env) {
const logger = require('winston').loggers.get('apiConfig');
const express = require('express');
const version = require('../../package.json').version;
const router = express.Router();
Function exports
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: 'src/public',
Function SpieleTabellenController
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function SpieleTabellenController($state, spiel, $rootScope) {
const vm = this;
_.extend(vm, {
gotoTeam: function (team, $event) {