kirushik/critical_chain

View on GitHub

Showing 212 of 215 total issues

Method has too many lines. [28/10]
Open

def update
@estimation = Estimation.find(params[:estimation_id]).decorate
@estimation_item = EstimationItem.find(params[:id])
 
authorize @estimation, :update?

Line is too long. [148/120]
Open

helpers.editable object, field, url: helpers.estimation_estimation_item_path(object.estimation, object), mode: :inline, type: type, class: field

Method update has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def update
@estimation = Estimation.find(params[:estimation_id]).decorate
@estimation_item = EstimationItem.find(params[:id])
 
authorize @estimation, :update?
Severity: Minor
Found in app/controllers/estimation_items_controller.rb - About 1 hr to fix

    EstimationItemsController#create has approx 6 statements
    Open

    def create

    EstimationItemsController#update has approx 10 statements
    Open

    def update

    EstimationItemsController tests 'request.xhr?' at least 3 times
    Open

    redirect_to estimation_path(@estimation) unless request.xhr?
    end
     
    def destroy
    @estimation = Estimation.find(params[:estimation_id]).decorate

    EstimationsController assumes too much for instance variable '@estimation'
    Open

    class EstimationsController < ApplicationController

    EstimationPolicy::Scope has no descriptive comment
    Open

    class Scope < Scope
    Severity: Minor
    Found in app/policies/estimation_policy.rb by reek

    EstimationItemDecorator has no descriptive comment
    Open

    class EstimationItemDecorator < Draper::Decorator

    ApplicationHelper has no descriptive comment
    Open

    module ApplicationHelper
    Severity: Minor
    Found in app/helpers/application_helper.rb by reek

    ApplicationController has no descriptive comment
    Open

    class ApplicationController < ActionController::Base

    ApplicationPolicy has no descriptive comment
    Open

    class ApplicationPolicy
    Severity: Minor
    Found in app/policies/application_policy.rb by reek

    EstimationPolicy has no descriptive comment
    Open

    class EstimationPolicy < ApplicationPolicy
    Severity: Minor
    Found in app/policies/estimation_policy.rb by reek

    WelcomeHelper has no descriptive comment
    Open

    module WelcomeHelper
    Severity: Minor
    Found in app/helpers/welcome_helper.rb by reek

    EstimationItemsController assumes too much for instance variable '@estimation_item'
    Open

    class EstimationItemsController < ApplicationController

    EstimationDecorator has no descriptive comment
    Open

    class EstimationDecorator < Draper::Decorator
    Severity: Minor
    Found in app/decorators/estimation_decorator.rb by reek

    Users::OmniauthCallbacksController assumes too much for instance variable '@user'
    Open

    class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController

    Users::OmniauthCallbacksController has no descriptive comment
    Open

    class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController

    Function activate_editables has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

    var activate_editables = function () {
    $('.editable').editable({success: function(response, newValue) {
    if(!response.success) return response.msg; //msg will be shown in editable form
    var vals = response.additionalValues;
    if(vals) {
    Severity: Minor
    Found in app/assets/javascripts/application.js - About 35 mins to fix

    EstimationItemsController assumes too much for instance variable '@estimation'
    Open

    class EstimationItemsController < ApplicationController
    Severity
    Category
    Status
    Source
    Language