fga-gpp-mds/2017.1-OndeE-UnB

View on GitHub

Showing 364 of 364 total issues

Class has too many lines. [168/100]
Open

class ParserController < ApplicationController
before_action :authenticate_admin!
def index
render plain: schedules
end

Similar blocks of code found in 2 locations. Consider refactoring.
Open

$(pointsPages).ready(function() {
// show floor plans
 
var options = {
marker: true
Severity: Major
Found in darcyWeb/app/assets/javascripts/admin/points.js and 1 other location - About 7 hrs to fix
darcyWeb/app/assets/javascripts/admin/buildings.js on lines 4..28

Similar blocks of code found in 2 locations. Consider refactoring.
Open

$(buildingsPages).ready(function() {
 
// show floor plans
 
var options = {
Severity: Major
Found in darcyWeb/app/assets/javascripts/admin/buildings.js and 1 other location - About 7 hrs to fix
darcyWeb/app/assets/javascripts/admin/points.js on lines 1..23

Method has too many lines. [69/25]
Open

def index
@contributors = [
{
avatar: "https://avatars0.githubusercontent.com/u/10123141?v=3&s=400",
name: "Alexandre Kryonidis",

Assignment Branch Condition size for schedules is too high. [38.72/15]
Open

def schedules
require 'nokogiri'
require 'open-uri'
 
courses.each do |course|

Similar blocks of code found in 2 locations. Consider refactoring.
Open

$.getJSON("/map/data/bathrooms", function(bathrooms) { //getting the json data
bathrooms.forEach(function(bathroom) {
try {
var geoJSON = JSON.parse(bathroom.geo_data);
bathroomLayer.addData(geoJSON); //adding the json data to the building layer
Severity: Major
Found in darcyWeb/app/assets/javascripts/map/data/bathroom.js and 1 other location - About 3 hrs to fix
darcyWeb/app/assets/javascripts/map/data/bikes.js on lines 17..26

Similar blocks of code found in 2 locations. Consider refactoring.
Open

$.getJSON("/map/data/bikes", function(bikes) { //getting the json data
bikes.forEach(function(bike) {
try {
var geoJSON = JSON.parse(bike.geo_data);
bikesLayer.addData(geoJSON); //adding the json data to the building layer
Severity: Major
Found in darcyWeb/app/assets/javascripts/map/data/bikes.js and 1 other location - About 3 hrs to fix
darcyWeb/app/assets/javascripts/map/data/bathroom.js on lines 17..26

Similar blocks of code found in 4 locations. Consider refactoring.
Open

$.getJSON("/map/data/busstops", function(data) { //getting the json data
data.forEach(function(busStop) {
try {
var geoJSON = JSON.parse(busStop.geo_data);
busstopLayer.addData(geoJSON); //adding the json data to the building layer
Severity: Major
Found in darcyWeb/app/assets/javascripts/map/data/busstops.js and 3 other locations - About 2 hrs to fix
darcyWeb/app/assets/javascripts/map/data/entrance.js on lines 16..25
darcyWeb/app/assets/javascripts/map/data/informationpoints.js on lines 14..23
darcyWeb/app/assets/javascripts/map/data/snackbar.js on lines 16..25

Similar blocks of code found in 4 locations. Consider refactoring.
Open

$.getJSON("/map/data/entrances", function(entrances) { //getting the json data
entrances.forEach(function(entrance) {
try {
var geoJSON = JSON.parse(entrance.geo_data);
entranceLayer.addData(geoJSON); //adding the json data to the building layer
Severity: Major
Found in darcyWeb/app/assets/javascripts/map/data/entrance.js and 3 other locations - About 2 hrs to fix
darcyWeb/app/assets/javascripts/map/data/busstops.js on lines 16..25
darcyWeb/app/assets/javascripts/map/data/informationpoints.js on lines 14..23
darcyWeb/app/assets/javascripts/map/data/snackbar.js on lines 16..25

Similar blocks of code found in 4 locations. Consider refactoring.
Open

$.getJSON("/map/data/snackbars", function(snackbars) { //getting the json data
snackbars.forEach(function(snackbar) {
try {
var geoJSON = JSON.parse(snackbar.geo_data);
snackbarLayer.addData(geoJSON); //adding the json data to the building layer
Severity: Major
Found in darcyWeb/app/assets/javascripts/map/data/snackbar.js and 3 other locations - About 2 hrs to fix
darcyWeb/app/assets/javascripts/map/data/busstops.js on lines 16..25
darcyWeb/app/assets/javascripts/map/data/entrance.js on lines 16..25
darcyWeb/app/assets/javascripts/map/data/informationpoints.js on lines 14..23

Method has too many lines. [36/25]
Open

def schedules
require 'nokogiri'
require 'open-uri'
 
courses.each do |course|

Similar blocks of code found in 4 locations. Consider refactoring.
Open

$.getJSON("/map/data/informationpoints", function(informationpoints) { //getting the json data
informationpoints.forEach(function(informationpoints) {
try {
var geoJSON = JSON.parse(informationpoints.geo_data);
informationPointsLayer.addData(geoJSON); //adding the json data to the building layer
darcyWeb/app/assets/javascripts/map/data/busstops.js on lines 16..25
darcyWeb/app/assets/javascripts/map/data/entrance.js on lines 16..25
darcyWeb/app/assets/javascripts/map/data/snackbar.js on lines 16..25

Method index has 69 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def index
@contributors = [
{
avatar: "https://avatars0.githubusercontent.com/u/10123141?v=3&s=400",
name: "Alexandre Kryonidis",
Severity: Major
Found in darcyWeb/app/controllers/about_controller.rb - About 2 hrs to fix

    Method has too many lines. [34/25]
    Open

    def geo(features)
    geo_json = []
    features.each do |feature|
     
    title = ''

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    var snackbarLayer = L.geoJSON("", {
    pointToLayer: function(feature, latlng) {
    var smallIcon = new L.Icon({
    // TODO Remove direct link to image
    iconUrl: "http://icons.iconarchive.com/icons/graphicloads/colorful-long-shadow/24/Restaurant-icon.png",
    Severity: Major
    Found in darcyWeb/app/assets/javascripts/map/data/snackbar.js and 2 other locations - About 2 hrs to fix
    darcyWeb/app/assets/javascripts/map/data/busstops.js on lines 3..14
    darcyWeb/app/assets/javascripts/map/data/entrance.js on lines 3..14

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    var entranceLayer = L.geoJSON("", {
    pointToLayer: function(feature, latlng) {
    var smallIcon = new L.Icon({
    // TODO Remove direct link to image
    iconUrl: "http://icons.iconarchive.com/icons/elegantthemes/beautiful-flat-one-color/24/door-icon.png",
    Severity: Major
    Found in darcyWeb/app/assets/javascripts/map/data/entrance.js and 2 other locations - About 2 hrs to fix
    darcyWeb/app/assets/javascripts/map/data/busstops.js on lines 3..14
    darcyWeb/app/assets/javascripts/map/data/snackbar.js on lines 3..14

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    var busstopLayer = L.geoJSON("", {
    pointToLayer: function(feature, latlng) {
    var smallIcon = new L.Icon({
    // TODO Remove direct link to image
    iconUrl: "http://icons.iconarchive.com/icons/elegantthemes/beautiful-flat/32/school-bus-icon.png",
    Severity: Major
    Found in darcyWeb/app/assets/javascripts/map/data/busstops.js and 2 other locations - About 2 hrs to fix
    darcyWeb/app/assets/javascripts/map/data/entrance.js on lines 3..14
    darcyWeb/app/assets/javascripts/map/data/snackbar.js on lines 3..14

    Function loadRooms has 64 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var loadRooms = function loadRooms(buildingKey) {
    $.get("/map/data/rooms/" + buildingKey, function(data) { //getting the json data
     
    var rooms = {
    "type": "FeatureCollection",
    Severity: Major
    Found in darcyWeb/app/assets/javascripts/map/data/rooms.js - About 2 hrs to fix

      Assignment Branch Condition size for geo is too high. [20.62/15]
      Open

      def geo(features)
      geo_json = []
      features.each do |feature|
       
      title = ''

      Block has too many lines. [48/25]
      Open

      Rails.application.routes.draw do
      mount JasmineRails::Engine => '/specs' if defined?(JasmineRails)
       
      devise_scope :admin do
      get 'admin/login', to: 'devise/sessions#new', as: 'new_login'
      Severity: Minor
      Found in darcyWeb/config/routes.rb by rubocop
      Severity
      Category
      Status
      Source
      Language