ocadotechnology/aimmo

View on GitHub

Showing 37 of 178 total issues

File sdk_pb2.py has 718 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: sdk.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
Severity: Major
Found in aimmo-game/agones/sdk_pb2.py - About 1 day to fix

File sdk_pb2_grpc.py has 420 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
 
from agones import sdk_pb2 as sdk__pb2
Severity: Minor
Found in aimmo-game/agones/sdk_pb2_grpc.py - About 6 hrs to fix

WorldMap has 29 functions (exceeds 20 allowed). Consider refactoring.
Open

class WorldMap(object):
"""
The non-player world state.
"""
 
 
Severity: Minor
Found in aimmo-game/simulation/world_map.py - About 3 hrs to fix

File game_manager.py has 282 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import logging
import secrets
import time
from abc import ABCMeta, abstractmethod
from concurrent import futures
Severity: Minor
Found in aimmo-game-creator/game_manager.py - About 2 hrs to fix

Function astar has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

def astar(world_map, start_cell, end_cell):
"""
Returns a list of Cell as a path from the given start to the given end in the given world_map.
The best path navigates the obstacles (but not other avatars, as they're assumed to be moving).
For explanation of the A* pathfinding, see the medium post at the top.
Severity: Minor
Found in aimmo-game-worker/simulation/pathfinding.py - About 1 hr to fix

Function install_minikube has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

def install_minikube(os_type, arch_type, version=MINIKUBE_VERSION):
comment = "install_minikube"
 
if version == "latest":
rc, lines = _cmd(
Severity: Minor
Found in aimmo_setup.py - About 1 hr to fix

Function install_kubectl has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

def install_kubectl(os_type, arch_type, version=KUBECTL_VERSION):
comment = "install_kubectl"
 
if version == "latest":
rc, lines = _cmd("curl -L -s https://dl.k8s.io/release/stable.txt")
Severity: Minor
Found in aimmo_setup.py - About 1 hr to fix

Function initializePyodide has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

async function initializePyodide() {
self.languagePluginUrl = 'https://pyodide-cdn2.iodide.io/v0.15.0/full/'
importScripts('https://pyodide-cdn2.iodide.io/v0.15.0/full/pyodide.js')
await languagePluginLoader
await pyodide.loadPackage(['micropip'])
Severity: Minor
Found in game_frontend/src/pyodide/webWorker.ts - About 1 hr to fix

Function codeReducer has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const codeReducer = (state = {}, action) => {
switch (action.type) {
case types.GET_CODE_SUCCESS:
return {
...state,
Severity: Minor
Found in game_frontend/src/redux/features/Editor/reducers.js - About 1 hr to fix

Function renderContent has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

renderContent (status) {
switch (status) {
case RunCodeButtonStatus.normal:
return (
<>
Severity: Minor
Found in game_frontend/src/components/RunCodeButton/index.js - About 1 hr to fix

Function Ready has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

def Ready(
Severity: Major
Found in aimmo-game/agones/sdk_pb2_grpc.py - About 1 hr to fix

Function Shutdown has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

def Shutdown(
Severity: Major
Found in aimmo-game/agones/sdk_pb2_grpc.py - About 1 hr to fix

Function SetLabel has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

def SetLabel(
Severity: Major
Found in aimmo-game/agones/sdk_pb2_grpc.py - About 1 hr to fix

Function Allocate has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

def Allocate(
Severity: Major
Found in aimmo-game/agones/sdk_pb2_grpc.py - About 1 hr to fix

Function SetAnnotation has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

def SetAnnotation(
Severity: Major
Found in aimmo-game/agones/sdk_pb2_grpc.py - About 1 hr to fix

Function Reserve has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

def Reserve(
Severity: Major
Found in aimmo-game/agones/sdk_pb2_grpc.py - About 1 hr to fix

Function Health has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

def Health(
Severity: Major
Found in aimmo-game/agones/sdk_pb2_grpc.py - About 1 hr to fix

Function GetGameServer has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

def GetGameServer(
Severity: Major
Found in aimmo-game/agones/sdk_pb2_grpc.py - About 1 hr to fix

Function WatchGameServer has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

def WatchGameServer(
Severity: Major
Found in aimmo-game/agones/sdk_pb2_grpc.py - About 1 hr to fix

Function gameReducer has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const gameReducer = (state = {}, action) => {
switch (action.type) {
case types.SOCKET_GAME_STATE_RECEIVED:
return {
...state,
Severity: Minor
Found in game_frontend/src/redux/features/Game/reducers.js - About 1 hr to fix
Severity
Category
Status
Source
Language