Method index
has 69 lines of code (exceeds 25 allowed). Consider refactoring.
def index
@contributors = [
{
avatar: "https://avatars0.githubusercontent.com/u/10123141?v=3&s=400",
name: "Alexandre Kryonidis",
Function loadRooms
has 64 lines of code (exceeds 25 allowed). Consider refactoring.
var loadRooms = function loadRooms(buildingKey) {
$.get("/map/data/rooms/" + buildingKey, function(data) {
var rooms = {
"type": "FeatureCollection",
Method schedules
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
def schedules
require 'nokogiri'
require 'open-uri'
courses.each do |course|
Function loadRouteForm
has 42 lines of code (exceeds 25 allowed). Consider refactoring.
function loadRouteForm(data) {
$("#sidebar").load("/map/routes", function() {
$(".btn-reverse-route").on("click", function(e) {
Method schedules
has 36 lines of code (exceeds 25 allowed). Consider refactoring.
def schedules
require 'nokogiri'
require 'open-uri'
courses.each do |course|
Method geo
has 34 lines of code (exceeds 25 allowed). Consider refactoring.
def geo(features)
geo_json = []
features.each do |feature|
title = ''
Function color
has 31 lines of code (exceeds 25 allowed). Consider refactoring.
const roomColor = function color(type) {
var color = "#3F51B5";
switch (type) {
case "classroom":
color = "#2196F3";
Function Map
has 28 lines of code (exceeds 25 allowed). Consider refactoring.
function Map() {
map.contextmenu.enable();
map.contextmenu.addItem({
text: "Rotas a partir daqui",
Method valid_schedule_and_room?
has 5 arguments (exceeds 4 allowed). Consider refactoring.
def valid_schedule_and_room?(day_of_week, start_time, end_time, room, classroom)
Function translateRoute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
function translateRoute(input) {
var originalInstr = input;
var translatedInstr = originalInstr;
for (var englishInstr in routesTranslations) {
Function copyToClipboard
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
function copyToClipboard(text) {
if (window.clipboardData && window.clipboardData.setData) {
return clipboardData.setData("Text", text);