Showing 167 of 167 total issues

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

  it('should have nested details content', () => {
    const sectionLabelEls =
        fixture.debugElement.queryAll(By.css('.fci-detail-content'));
    expect(sectionLabelEls.length).toBe(1);
  });
web/app/common/components/master-detail-card/master-detail-card.component.spec.ts on lines 37..41

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 59.

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

    def remote_file_a_json_array?(file_path)
      return false unless configuration_repository_exists?
      logger.debug("Checking that #{repo_shortform}/#{file_path} is a json array")

      contents_map = {}
Severity: Minor
Found in app/services/configuration_repository_service.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 start has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def start
      logger.debug("Starting build runner #{self.class} for #{project.project_name} #{project.id} sha: #{sha} now...")
      start_time = Time.now

      work_block = proc do
Severity: Minor
Found in app/features/build_runner/build_runner.rb - About 1 hr to fix

    Method commit_changes! has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def commit_changes!(commit_message: nil, push_after_commit: true, files_to_commit: [], repo_auth: self.repo_auth)
          git_action_with_queue do
            logger.debug("Starting commit_changes! #{git_config.git_url} for #{repo_auth.username}")
            commit_message ||= "Automatic commit by fastlane.ci"
    
    
    Severity: Minor
    Found in app/shared/models/git_repo.rb - About 1 hr to fix

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

          const dialogRef =
              this.dialog.open<AddProjectDialogComponent, AddProjectDialogConfig>(
                  AddProjectDialogComponent, {
                    panelClass: 'fci-dialog-xs-fullscreen',
                    width: '637px',
      Severity: Major
      Found in web/app/dashboard/dashboard.component.ts and 1 other location - About 1 hr to fix
      web/app/project/project.component.ts on lines 65..71

      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 55.

      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

          const dialogRef =
              this.dialog.open<SettingsDialogComponent, SettingsDialogData>(
                  SettingsDialogComponent, {
                    panelClass: 'fci-dialog',
                    width: '1028px',
      Severity: Major
      Found in web/app/project/project.component.ts and 1 other location - About 1 hr to fix
      web/app/dashboard/dashboard.component.ts on lines 39..45

      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 55.

      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

          def initialize(environment_variable_data_source: nil)
            unless environment_variable_data_source.nil?
              unless environment_variable_data_source.class <= EnvironmentDataSource
                raise "environment_variable_data_source must be descendant of #{EnvironmentDataSource.name}"
              end
      Severity: Major
      Found in app/services/environment_variable_service.rb and 3 other locations - About 55 mins to fix
      app/services/apple_id_service.rb on lines 16..35
      app/services/setting_service.rb on lines 15..34
      app/services/user_service.rb on lines 12..29

      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 45.

      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

          def initialize(apple_id_data_source: nil)
            unless apple_id_data_source.nil?
              unless apple_id_data_source.class <= AppleIDDataSource
                raise "apple_id_data_source must be descendant of #{AppleIDDataSource.name}"
              end
      Severity: Major
      Found in app/services/apple_id_service.rb and 3 other locations - About 55 mins to fix
      app/services/environment_variable_service.rb on lines 11..30
      app/services/setting_service.rb on lines 15..34
      app/services/user_service.rb on lines 12..29

      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 45.

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

          def fetch_available_lanes(fastfile_parser)
            # we don't want to show `_before_all_block_`, `_after_all_block_` and `_error_block_`
            # or a private lane as an available lane
            lanes = []
            fastfile_parser.tree.each do |platform, value|
      Severity: Minor
      Found in app/features/project/project_controller.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

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

          def initialize(setting_data_source: nil)
            unless setting_data_source.nil?
              unless setting_data_source.class <= SettingDataSource
                raise "setting_data_source must be descendant of #{SettingDataSource.name}"
              end
      Severity: Major
      Found in app/services/setting_service.rb and 3 other locations - About 55 mins to fix
      app/services/apple_id_service.rb on lines 16..35
      app/services/environment_variable_service.rb on lines 11..30
      app/services/user_service.rb on lines 12..29

      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 45.

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

          def fetch_available_lanes(fastfile_parser)
            # we don't want to show `_before_all_block_`, `_after_all_block_` and `_error_block_`
            # or a private lane as an available lane
            lanes = []
            fastfile_parser.tree.each do |platform, value|
      Severity: Minor
      Found in app/features-json/repos_json_controller.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

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

            def _from_json!(var, val, is_iterable: false)
              # TODO: attribute_key_name_map doesn't seem to be used anywhere in the code base
              if attribute_key_name_map.key(var)
                var_name = attribute_key_name_map.key(var).to_sym
              else
      Severity: Minor
      Found in app/shared/json_convertible.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

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

          def start
            save_build_status_locally!
      
            env = environment_variables_for_worker
            start_time = Time.now.utc
      Severity: Minor
      Found in app/features/build_runner/remote_runner.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

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

          def initialize(user_data_source: nil)
            unless user_data_source.nil?
              unless user_data_source.class <= UserDataSource
                raise "user_data_source must be descendant of #{UserDataSource.name}"
              end
      Severity: Major
      Found in app/services/user_service.rb and 3 other locations - About 55 mins to fix
      app/services/apple_id_service.rb on lines 16..35
      app/services/environment_variable_service.rb on lines 11..30
      app/services/setting_service.rb on lines 15..34

      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 45.

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

          def store!(artifact:, build:, project:)
            raise "Artifact to store was not provided or wrong type provided" unless artifact&.is_a?(Artifact)
            raise "Build was not provided or wrong type provided" unless build&.is_a?(Build)
            raise "Project was not provided or wrong type provided" unless project&.is_a?(Project)
      
      
      Severity: Minor
      Found in app/shared/models/gcp_artifact_provider.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

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

      export function expectElementToExist(context: DebugElement, selector: string) {
        return expect(doesElementExist(context, selector))
            .toBe(
                true,
                `An element was expected to exist, but was not found\nSelector: '${
      Severity: Minor
      Found in web/app/common/test_helpers/element_helper_functions.ts and 1 other location - About 55 mins to fix
      web/app/common/test_helpers/element_helper_functions.ts on lines 43..50

      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 53.

      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

      export function expectElementNotToExist(
          context: DebugElement, selector: string) {
        return expect(doesElementExist(context, selector))
            .toBe(
                false,
      Severity: Minor
      Found in web/app/common/test_helpers/element_helper_functions.ts and 1 other location - About 55 mins to fix
      web/app/common/test_helpers/element_helper_functions.ts on lines 35..41

      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 53.

      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

      export const mockRepositoryListResponse: RepositoryResponse[] = [
        {
          full_name: 'fastlane/ci',
          url: 'https://github.com/fastlane/ci'
        },
      Severity: Minor
      Found in web/app/common/test_helpers/mock_repository_data.ts and 1 other location - About 50 mins to fix
      web/app/dashboard/add-project-dialog/add-project-dialog.component.ts on lines 21..25

      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 52.

      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

      const TRIGGER_OPTIONS: TriggerOption[] = [
        { viewValue: 'for every commit', value: 'commit' },
        { viewValue: 'for every pull request', value: 'pull_request' },
        { viewValue: 'nightly', value: 'nightly' },
      ];
      web/app/common/test_helpers/mock_repository_data.ts on lines 8..21

      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 52.

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

          def fastfile_from_contents_map(contents_map)
            github_action(@client) do |_client|
              return nil if contents_map.nil?
      
              if contents_map
      Severity: Minor
      Found in app/shared/fastfile_peeker.rb - About 45 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