next-l/enju_leaf

View on GitHub
app/assets/javascripts/enju_event/gcal.js

Summary

Maintainability
B
4 hrs
Test Coverage

Function transformOptions has 71 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function transformOptions(sourceOptions, start, end, timezone, calendar) {
    var url = API_BASE + '/' + encodeURIComponent(sourceOptions.googleCalendarId) + '/events?callback=?'; // jsonp
    var apiKey = sourceOptions.googleCalendarApiKey || calendar.options.googleCalendarApiKey;
    var success = sourceOptions.success;
    var data;
Severity: Major
Found in app/assets/javascripts/enju_event/gcal.js - About 2 hrs to fix

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

            success: function(data) {
                var events = [];
                var successArgs;
                var successRes;
    
    
    Severity: Minor
    Found in app/assets/javascripts/enju_event/gcal.js - About 1 hr to fix

      Function transformOptions has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function transformOptions(sourceOptions, start, end, timezone, calendar) {
      Severity: Minor
      Found in app/assets/javascripts/enju_event/gcal.js - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status