satoyos/Shuffle100

View on GitHub

Showing 26 of 41 total issues

Method stop has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  def stop
    raise 'Any recording process started' unless @pid

    # 録画終了
    # たまに"No such process"で失敗するので、そのエラーはrescueで無視する。
Severity: Minor
Found in appium_tests/lib/recorder.rb - About 25 mins to fix

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 audioPlayerDidFinishPlaying has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  def audioPlayerDidFinishPlaying(player, successfully: flag)
    return unless flag

    puts '- 読み上げが無事に終了!(初心者モード)' if BW2.debug?
    layout.play_finished_successfully
Severity: Minor
Found in app/screens/beginner_recite_screen.rb - About 25 mins to fix

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|
Severity: Minor
Found in app/delegates/poem_picker_delegate.rb - About 25 mins to fix

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
Severity: Minor
Found in app/lib/table_screen_patches/table_patch.rb - About 25 mins to fix

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_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 == '立ち上げる'
Severity: Minor
Found in app/screens/help_menu_screen.rb - About 25 mins to fix

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|
Severity: Minor
Found in app/models/deck.rb - About 25 mins to fix

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

Severity
Category
Status
Source
Language