google/EarlGrey

View on GitHub

Showing 50 of 50 total issues

Method copy_swift_files has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
Open

    def copy_swift_files(project, target, swift_version = nil)
      return unless has_swift?(target) || !swift_version.to_s.empty?
      project_test_targets = project.main_group.children
      test_target_group = project_test_targets.find { |g| g.display_name == target.name }

Severity: Minor
Found in gem/lib/earlgrey/configure_earlgrey.rb - About 2 hrs 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

Function viewDidLoad has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  override func viewDidLoad() {
    super.viewDidLoad()

    // Create the send message view to contain one of the two send buttons
    let sendMessageView = SendMessageView(frame: CGRect(x: 0, y: 0, width: 200, height: 200))
Severity: Minor
Found in Demo/EarlGreyExample/EarlGreyExampleSwift/ViewController.swift - About 1 hr to fix

    Method copy_swift_files has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def copy_swift_files(project, target, swift_version = nil)
          return unless has_swift?(target) || !swift_version.to_s.empty?
          project_test_targets = project.main_group.children
          test_target_group = project_test_targets.find { |g| g.display_name == target.name }
    
    
    Severity: Minor
    Found in gem/lib/earlgrey/configure_earlgrey.rb - About 1 hr to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

        @discardableResult open class func rotateDeviceTo(orientation: UIDeviceOrientation,
                                                          errorOrNil: UnsafeMutablePointer<NSError?>!,
                                                          file: StaticString = #file,
                                                          line: UInt = #line)
          -> Bool {
      Severity: Major
      Found in gem/lib/earlgrey/files/Swift-3.0/EarlGrey.swift and 1 other location - About 1 hr to fix
      gem/lib/earlgrey/files/Swift-4.0/EarlGrey.swift on lines 132..140

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 85.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

        @discardableResult open class func rotateDeviceTo(orientation: UIDeviceOrientation,
                                                          errorOrNil: UnsafeMutablePointer<NSError?>!,
                                                          file: StaticString = #file,
                                                          line: UInt = #line)
          -> Bool {
      Severity: Major
      Found in gem/lib/earlgrey/files/Swift-4.0/EarlGrey.swift and 1 other location - About 1 hr to fix
      gem/lib/earlgrey/files/Swift-3.0/EarlGrey.swift on lines 124..132

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 85.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Function testCustomAction has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        func testCustomAction() {
          // Fade in and out an element.
          let fadeInAndOut = { (element: UIView) -> Void in
            UIView.animate(withDuration: 1.0, delay: 0.0,
                           options: UIViewAnimationOptions.curveEaseOut,

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

        extension GREYCondition {
          open func waitWithTimeout(seconds: CFTimeInterval) -> Bool {
            return self.wait(withTimeout: seconds)
          }
        
        
        Severity: Major
        Found in gem/lib/earlgrey/files/Swift-3.0/EarlGrey.swift and 1 other location - About 1 hr to fix
        gem/lib/earlgrey/files/Swift-4.0/EarlGrey.swift on lines 179..188

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 76.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

        extension GREYCondition {
          open func waitWithTimeout(seconds: CFTimeInterval) -> Bool {
            return self.wait(withTimeout: seconds)
          }
        
        
        Severity: Major
        Found in gem/lib/earlgrey/files/Swift-4.0/EarlGrey.swift and 1 other location - About 1 hr to fix
        gem/lib/earlgrey/files/Swift-3.0/EarlGrey.swift on lines 151..160

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 76.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Method add_environment_variables_to_test_scheme has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def add_environment_variables_to_test_scheme(name, scheme)
              name = File.basename(name, '.xcscheme')
              test_action = scheme.test_action
              test_variables = test_action.environment_variables
        
        
        Severity: Minor
        Found in gem/lib/earlgrey/configure_earlgrey.rb - About 1 hr to fix

          Similar blocks of code found in 4 locations. Consider refactoring.
          Open

          public func GREYAssertEqualObjects<T: Equatable>( _ left: @autoclosure () -> T?,
                                                            _ right: @autoclosure () -> T?,
                                                            reason: String) {
            GREYAssert(left() == right(), reason, details: "Expected object of the left term to be equal " +
              "to the object of the right term")
          Severity: Major
          Found in gem/lib/earlgrey/files/Swift-4.0/EarlGrey.swift and 3 other locations - About 1 hr to fix
          gem/lib/earlgrey/files/Swift-3.0/EarlGrey.swift on lines 50..55
          gem/lib/earlgrey/files/Swift-3.0/EarlGrey.swift on lines 57..62
          gem/lib/earlgrey/files/Swift-4.0/EarlGrey.swift on lines 57..62

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 74.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 4 locations. Consider refactoring.
          Open

          public func GREYAssertEqualObjects<T: Equatable>( _ left: @autoclosure () -> T?,
                                                            _ right: @autoclosure () -> T?,
                                                            reason: String) {
            GREYAssert(left() == right(), reason, details: "Expected object of the left term to be equal " +
              "to the object of the right term")
          Severity: Major
          Found in gem/lib/earlgrey/files/Swift-3.0/EarlGrey.swift and 3 other locations - About 1 hr to fix
          gem/lib/earlgrey/files/Swift-3.0/EarlGrey.swift on lines 57..62
          gem/lib/earlgrey/files/Swift-4.0/EarlGrey.swift on lines 50..55
          gem/lib/earlgrey/files/Swift-4.0/EarlGrey.swift on lines 57..62

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 74.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

          private func GREYSetCurrentAsFailable() {
            let greyFailureHandlerSelector =
              #selector(GREYFailureHandler.setInvocationFile(_:andInvocationLine:))
            let greyFailureHandler =
              Thread.current.threadDictionary.value(forKey: kGREYFailureHandlerKey) as! GREYFailureHandler
          Severity: Major
          Found in gem/lib/earlgrey/files/Swift-4.0/EarlGrey.swift and 1 other location - About 1 hr to fix
          gem/lib/earlgrey/files/Swift-3.0/EarlGrey.swift on lines 87..95

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 74.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 4 locations. Consider refactoring.
          Open

          public func GREYAssertNotEqualObjects<T: Equatable>( _ left: @autoclosure () -> T?,
                                                               _ right: @autoclosure () -> T?,
                                                               reason: String) {
            GREYAssert(left() != right(), reason, details: "Expected object of the left term to not " +
              "equal the object of the right term")
          Severity: Major
          Found in gem/lib/earlgrey/files/Swift-4.0/EarlGrey.swift and 3 other locations - About 1 hr to fix
          gem/lib/earlgrey/files/Swift-3.0/EarlGrey.swift on lines 50..55
          gem/lib/earlgrey/files/Swift-3.0/EarlGrey.swift on lines 57..62
          gem/lib/earlgrey/files/Swift-4.0/EarlGrey.swift on lines 50..55

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 74.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

          private func GREYSetCurrentAsFailable() {
            let greyFailureHandlerSelector =
              #selector(GREYFailureHandler.setInvocationFile(_:andInvocationLine:))
            let greyFailureHandler =
              Thread.current.threadDictionary.value(forKey: kGREYFailureHandlerKey) as! GREYFailureHandler
          Severity: Major
          Found in gem/lib/earlgrey/files/Swift-3.0/EarlGrey.swift and 1 other location - About 1 hr to fix
          gem/lib/earlgrey/files/Swift-4.0/EarlGrey.swift on lines 87..95

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 74.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 4 locations. Consider refactoring.
          Open

          public func GREYAssertNotEqualObjects<T: Equatable>( _ left: @autoclosure () -> T?,
                                                               _ right: @autoclosure () -> T?,
                                                               reason: String) {
            GREYAssert(left() != right(), reason, details: "Expected object of the left term to not " +
              "equal the object of the right term")
          Severity: Major
          Found in gem/lib/earlgrey/files/Swift-3.0/EarlGrey.swift and 3 other locations - About 1 hr to fix
          gem/lib/earlgrey/files/Swift-3.0/EarlGrey.swift on lines 50..55
          gem/lib/earlgrey/files/Swift-4.0/EarlGrey.swift on lines 50..55
          gem/lib/earlgrey/files/Swift-4.0/EarlGrey.swift on lines 57..62

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 74.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

          private func GREYAssert(_ expression: @autoclosure () -> Bool,
                                  _ reason: String, details: String) {
            GREYSetCurrentAsFailable()
            GREYWaitUntilIdle()
            if !expression() {
          Severity: Major
          Found in gem/lib/earlgrey/files/Swift-4.0/EarlGrey.swift and 1 other location - About 1 hr to fix
          gem/lib/earlgrey/files/Swift-3.0/EarlGrey.swift on lines 76..85

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 72.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

          private func GREYAssert(_ expression: @autoclosure () -> Bool,
                                  _ reason: String, details: String) {
            GREYSetCurrentAsFailable()
            GREYWaitUntilIdle()
            if !expression() {
          Severity: Major
          Found in gem/lib/earlgrey/files/Swift-3.0/EarlGrey.swift and 1 other location - About 1 hr to fix
          gem/lib/earlgrey/files/Swift-4.0/EarlGrey.swift on lines 76..85

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 72.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

            open class func handle(exception: GREYFrameworkException,
                                   details: String,
                                   file: StaticString = #file,
                                   line: UInt = #line) {
              return EarlGreyImpl.invoked(fromFile: file.description, lineNumber: line)
          Severity: Minor
          Found in gem/lib/earlgrey/files/Swift-4.0/EarlGrey.swift and 1 other location - About 55 mins to fix
          gem/lib/earlgrey/files/Swift-3.0/EarlGrey.swift on lines 116..122

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 67.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

            open class func handle(exception: GREYFrameworkException,
                                   details: String,
                                   file: StaticString = #file,
                                   line: UInt = #line) {
              return EarlGreyImpl.invoked(fromFile: file.description, lineNumber: line)
          Severity: Minor
          Found in gem/lib/earlgrey/files/Swift-3.0/EarlGrey.swift and 1 other location - About 55 mins to fix
          gem/lib/earlgrey/files/Swift-4.0/EarlGrey.swift on lines 124..130

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 67.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Method analyze has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              def analyze(*_)
                result = super
                earlgrey_yaml = EarlGreyYaml.new(result, podfile)
                eg_targets = result.targets.select(&:is_earlgrey?).each do |target|
                  target.user_targets.each do |native_target|
          Severity: Minor
          Found in gem/lib/earlgrey/extensions/analyzer_extensions.rb - About 55 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