cre-ne-jp/log-archiver

View on GitHub
app/controllers/channels/days_controller.rb

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 5 of 5 total issues

Method has too many lines. [62/30]
Open

def show
target_channels, @other_channels = Channel.
order_for_list.
partition { |channel| channel.identifier == params[:id] }
@channel = target_channels.first

Method has too many lines. [37/30]
Open

def index
target_channels, @other_channels = Channel.
order_for_list.
partition { |channel| channel.identifier == params[:id] }
@channel = target_channels.first

Cyclomatic complexity for show is too high. [7/6]
Open

def show
target_channels, @other_channels = Channel.
order_for_list.
partition { |channel| channel.identifier == params[:id] }
@channel = target_channels.first

Method show has 62 lines of code (exceeds 50 allowed). Consider refactoring.
Open

def show
target_channels, @other_channels = Channel.
order_for_list.
partition { |channel| channel.identifier == params[:id] }
@channel = target_channels.first
Severity: Major
Found in app/controllers/channels/days_controller.rb - About 1 hr to fix

    Method show has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

    def show
    target_channels, @other_channels = Channel.
    order_for_list.
    partition { |channel| channel.identifier == params[:id] }
    @channel = target_channels.first
    Severity: Minor
    Found in app/controllers/channels/days_controller.rb - About 1 hr to fix
    Category
    Status