bskim45/fastlane-plugin-google_drive

View on GitHub

Showing 11 of 25 total issues

Method available_options has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

      def self.available_options
        [
          FastlaneCore::ConfigItem.new(key: :drive_keyfile,
                                      env_name: 'GDRIVE_KEY_FILE',
                                      description: 'Json config file',

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 available_options has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      def self.available_options
        [
          FastlaneCore::ConfigItem.new(key: :drive_keyfile,
                                      env_name: 'GDRIVE_KEY_FILE',
                                      description: 'Json config file',

    Method available_options has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          def self.available_options
            [
              FastlaneCore::ConfigItem.new(
                key: :drive_keyfile,
                env_name: 'GDRIVE_KEY_FILE',

      Method available_options has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

            def self.available_options
              [
                FastlaneCore::ConfigItem.new(key: :drive_keyfile,
                                            env_name: 'GDRIVE_KEY_FILE',
                                            description: 'Json config file',

      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 available_options has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            def self.available_options
              [
                FastlaneCore::ConfigItem.new(key: :drive_keyfile,
                                            env_name: 'GDRIVE_KEY_FILE',
                                            description: 'Json config file',

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

              def self.available_options
                [
                  FastlaneCore::ConfigItem.new(key: :drive_keyfile,
                                               env_name: 'GDRIVE_KEY_FILE',
                                               description: 'Json config file',

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

                def self.available_options
                  [
                    FastlaneCore::ConfigItem.new(
                      key: :drive_keyfile,
                      env_name: 'GDRIVE_KEY_FILE',

          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 available_options has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                def self.available_options
                  [
                    FastlaneCore::ConfigItem.new(
                      key: :drive_keyfile,
                      env_name: 'GDRIVE_KEY_FILE',

            Method available_options has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

                  def self.available_options
                    [
                      FastlaneCore::ConfigItem.new(key: :drive_keyfile,
                                                   env_name: 'GDRIVE_KEY_FILE',
                                                   description: 'Json config file',

            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 run has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  def self.run(params)
                    UI.message("Using credential file: #{params[:drive_keyfile]}")
            
                    session = Helper::GoogleDriveHelper.setup(
                      keyfile: params[:drive_keyfile],

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

                    def self.available_options
                      [
                        FastlaneCore::ConfigItem.new(
                          key: :drive_keyfile,
                          env_name: 'GDRIVE_KEY_FILE',

              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