fga-gpp-mds/2017.1-OndeE-UnB

View on GitHub

Showing 11 of 364 total issues

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

    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

      Method schedules has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

      def schedules
      require 'nokogiri'
      require 'open-uri'
       
      courses.each do |course|
      Severity: Minor
      Found in darcyWeb/app/controllers/parser_controller.rb - About 1 hr to fix

      Function loadRouteForm has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function loadRouteForm(data) {
       
      $("#sidebar").load("/map/routes", function() {
       
      $(".btn-reverse-route").on("click", function(e) {
      Severity: Minor
      Found in darcyWeb/app/assets/javascripts/map/routes/index.js - About 1 hr to fix

        Method schedules has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        def schedules
        require 'nokogiri'
        require 'open-uri'
         
        courses.each do |course|
        Severity: Minor
        Found in darcyWeb/app/controllers/parser_controller.rb - About 1 hr to fix

          Method geo has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          def geo(features)
          geo_json = []
          features.each do |feature|
           
          title = ''
          Severity: Minor
          Found in darcyWeb/app/controllers/map/search_controller.rb - About 1 hr to fix

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

            const roomColor = function color(type) {
            var color = "#3F51B5";
            switch (type) {
            case "classroom":
            color = "#2196F3";
            Severity: Minor
            Found in darcyWeb/app/assets/javascripts/map/data/rooms.js - About 1 hr to fix

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

              function Map() {
              // enable and set options to the contextmenu
              map.contextmenu.enable();
              map.contextmenu.addItem({
              text: "Rotas a partir daqui",
              Severity: Minor
              Found in darcyWeb/app/assets/javascripts/map/routes/map.js - About 1 hr to fix

                Method valid_schedule_and_room? has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def valid_schedule_and_room?(day_of_week, start_time, end_time, room, classroom)
                Severity: Minor
                Found in darcyWeb/app/controllers/parser_controller.rb - About 35 mins to fix

                  Function translateRoute has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function translateRoute(input) {
                  var originalInstr = input;
                   
                  var translatedInstr = originalInstr;
                  for (var englishInstr in routesTranslations) {
                  Severity: Minor
                  Found in darcyWeb/app/assets/javascripts/map/routes/translations.js - About 25 mins to fix

                  Function copyToClipboard has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function copyToClipboard(text) {
                  if (window.clipboardData && window.clipboardData.setData) {
                  // IE specific code path to prevent textarea being shown while dialog is visible.
                  return clipboardData.setData("Text", text);
                   
                   
                  Severity: Minor
                  Found in darcyWeb/app/assets/javascripts/map/share_location.js - About 25 mins to fix
                  Severity
                  Category
                  Status
                  Source
                  Language