CocoaPods/Xcodeproj

View on GitHub
lib/xcodeproj/project/project_helper.rb

Summary

Maintainability
B
4 hrs
Test Coverage
A
100%

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

      def self.common_build_settings(type, platform = nil, deployment_target = nil, target_product_type = nil, language = :objc)
        target_product_type = (Constants::PRODUCT_TYPE_UTI.find { |_, v| v == target_product_type } || [target_product_type || :application])[0]
        common_settings = Constants::COMMON_BUILD_SETTINGS

        # Use intersecting settings for all key sets as base
Severity: Minor
Found in lib/xcodeproj/project/project_helper.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 new_target has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

      def self.new_target(project, type, name, platform, deployment_target, product_group, language, product_basename)
Severity: Major
Found in lib/xcodeproj/project/project_helper.rb - About 1 hr to fix

    Method new_legacy_target has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

          def self.new_legacy_target(project, name, build_tool_path = '/usr/bin/make', build_arguments_string = '$(ACTION)',
                                     build_working_directory = nil, pass_build_settings_in_environment = '1')
    Severity: Minor
    Found in lib/xcodeproj/project/project_helper.rb - About 45 mins to fix

      Method common_build_settings has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

            def self.common_build_settings(type, platform = nil, deployment_target = nil, target_product_type = nil, language = :objc)
      Severity: Minor
      Found in lib/xcodeproj/project/project_helper.rb - About 35 mins to fix

        Method new_resources_bundle has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

              def self.new_resources_bundle(project, name, platform, product_group, product_basename)
        Severity: Minor
        Found in lib/xcodeproj/project/project_helper.rb - About 35 mins to fix

          Method configuration_list has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                def self.configuration_list(project, platform = nil, deployment_target = nil, target_product_type = nil, language = nil)
          Severity: Minor
          Found in lib/xcodeproj/project/project_helper.rb - About 35 mins to fix

            There are no issues that match your filters.

            Category
            Status