Showing 666 of 1,371 total issues
Function ChallengeCtrl
has 2776 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ChallengeCtrl(utilities, loaderService, $scope, $state, $http, $stateParams, $rootScope, $interval, $mdDialog, moment, $location, $anchorScroll, $timeout) {
var vm = this;
vm.areSubmissionsFailing = false;
vm.getAllEntriesTestOption = "Include private submissions";
vm.showPrivateIds = [];
File views.py
has 4348 lines of code (exceeds 250 allowed). Consider refactoring. Open
import csv
import json
import logging
import os
import pytz
File challengeCtrl.js
has 2785 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Invoking IIFE for challenge page
(function() {
'use strict';
angular
File views.py
has 2694 lines of code (exceeds 250 allowed). Consider refactoring. Open
import botocore
import datetime
import json
import logging
import os
File aws_utils.py
has 1597 lines of code (exceeds 250 allowed). Consider refactoring. Open
import json
import logging
import os
import random
import string
Function create_challenge_using_zip_file
has a Cognitive Complexity of 203 (exceeds 5 allowed). Consider refactoring. Open
def create_challenge_using_zip_file(request, challenge_host_team_pk):
"""
Creates a challenge using a zip file.
"""
challenge_host_team = get_challenge_host_team_model(challenge_host_team_pk)
- 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 create_or_update_github_challenge
has a Cognitive Complexity of 199 (exceeds 5 allowed). Consider refactoring. Open
def create_or_update_github_challenge(request, challenge_host_team_pk):
try:
challenge_host_team = get_challenge_host_team_model(
challenge_host_team_pk
)
- 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 challengesettings.component.ts
has 1176 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Component, OnInit, OnDestroy, QueryList, ViewChildren } from '@angular/core';
import { COMMA, ENTER } from '@angular/cdk/keycodes';
import { MatChipInputEvent } from '@angular/material/chips';
import { Router } from '@angular/router';
import { NGXLogger } from 'ngx-logger';
Function configure
has 578 lines of code (exceeds 25 allowed). Consider refactoring. Open
function configure($stateProvider, $urlRouterProvider, $locationProvider, $urlMatcherFactoryProvider) {
//in order to prevent 404 for trailing '/' in urls
$urlMatcherFactoryProvider.strictMode(false);
Function update_partially_evaluated_submission
has a Cognitive Complexity of 133 (exceeds 5 allowed). Consider refactoring. Open
def update_partially_evaluated_submission(request, challenge_pk):
"""
API endpoint to update submission related attributes
Query Parameters:
- 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 challenge_config_utils.py
has 1029 lines of code (exceeds 250 allowed). Consider refactoring. Open
import logging
import requests
import zipfile
import yaml
File submission_worker.py
has 771 lines of code (exceeds 250 allowed). Consider refactoring. Open
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import contextlib
import importlib
Function TeamsCtrl
has 347 lines of code (exceeds 25 allowed). Consider refactoring. Open
function TeamsCtrl(utilities,loaderService, $scope, $state, $http, $rootScope, $mdDialog) {
var vm = this;
var userKey = utilities.getData('userKey');
var challengePk = 1;
File code_upload_submission_worker.py
has 729 lines of code (exceeds 250 allowed). Consider refactoring. Open
import json
import logging
import os
import signal
import sys
Function ChallengeHostTeamsCtrl
has 328 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ChallengeHostTeamsCtrl(utilities, loaderService, $scope, $state, $http, $rootScope, $mdDialog) {
var vm = this;
var userKey = utilities.getData('userKey');
utilities.showLoader();
Function AuthCtrl
has 320 lines of code (exceeds 25 allowed). Consider refactoring. Open
function AuthCtrl(utilities, $state, $rootScope) {
var vm = this;
// condition for showing password strength
vm.showPasswordStrength = false;
vm.isRem = false;
Function update_submission
has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring. Open
def update_submission(request, challenge_pk):
"""
API endpoint to update submission related attributes
Query Parameters:
- 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 profileCtrl
has 316 lines of code (exceeds 25 allowed). Consider refactoring. Open
function profileCtrl(utilities, $rootScope, $scope, $mdDialog, moment, $state) {
var vm = this;
vm.user = {};
vm.countLeft = 0;
File route-config.js
has 680 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Config for the router
*/
(function () {
Function validate_challenge_phases
has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring. Open
def validate_challenge_phases(self, current_phase_config_ids):
challenge_phases_data = self.yaml_file_data.get("challenge_phases")
if not challenge_phases_data:
message = self.error_messages_dict["missing_challenge_phases"]
self.error_messages.append(message)
- 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"