Showing 26 of 41 total issues
Method confirm_user_to_review
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def confirm_user_to_review
UIAlertView.alert('このアプリを評価するために、App Storeアプリを立ち上げますか?',
buttons: ['立ち上げる', 'やめておく']
) do |button, button_index|
if button == '立ち上げる'
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method confirm_user_to_quit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def confirm_user_to_quit
UIAlertView.alert('試合を終了しますか?',
buttons: ['終了する', '続ける']
) do |button, button_index|
if button == '終了する'
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method set_up_header_footer_views
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def set_up_header_footer_views
[:header, :footer].each do |hf_view|
if self.respond_to?("table_#{hf_view}_view".to_sym)
view = self.send("table_#{hf_view}_view")
if view.is_a? UIView
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method select_from_bool100
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def select_from_bool100(bool100)
raise 'use array[100] for select_from_bool100:' unless bool100.size == 100
raise "number of poems in deck => #{@poems.size}" unless @poems.size == 100
poems = []
@poems.each_with_index do |poem, idx|
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method actions_for_save
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def actions_for_save
actions = [
{
title: '新しい札セットとして保存する',
handler: Proc.new {|obj|
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method pushed_button_of_color
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def pushed_button_of_color(color_sym)
puts "+ 「#{str_of_color(color_sym)}グループ」ボタンが押された!" if BW2.debug?
alert = UIAlertController.alertControllerWithTitle(
"#{str_of_color(color_sym)}色の20首をどうしますか?",
message: nil,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"