CocoaPods/CocoaPods

View on GitHub
lib/cocoapods/installer/user_project_integrator.rb

Summary

Maintainability
A
2 hrs
Test Coverage
A
100%

Method warn_about_xcconfig_overrides has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

      def warn_about_xcconfig_overrides
        targets_to_integrate.each do |aggregate_target|
          aggregate_target.user_targets.each do |user_target|
            user_target.build_configurations.each do |config|
              xcconfig = aggregate_target.xcconfigs[config.name]
Severity: Minor
Found in lib/cocoapods/installer/user_project_integrator.rb - About 1 hr 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 initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

      def initialize(podfile, sandbox, installation_root, targets, targets_to_integrate, use_input_output_paths: true)
Severity: Minor
Found in lib/cocoapods/installer/user_project_integrator.rb - About 35 mins to fix

    Method workspace_path has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

          def workspace_path
            if podfile.workspace_path
              declared_path = podfile.workspace_path
              path_with_ext = File.extname(declared_path) == '.xcworkspace' ? declared_path : "#{declared_path}.xcworkspace"
              podfile_dir   = File.dirname(podfile.defined_in_file || '')
    Severity: Minor
    Found in lib/cocoapods/installer/user_project_integrator.rb - About 35 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

    There are no issues that match your filters.

    Category
    Status