fnichol/capistrano-fanfare

View on GitHub

Showing 15 of 18 total issues

Method load_into has 122 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def self.load_into(configuration)
    configuration.load do
      fanfare_require 'foreman', 'foreman/procfile'

      set(:local_procfile)      { ENV['PROCFILE'] || "Procfile" }
Severity: Major
Found in lib/capistrano/fanfare/foreman.rb - About 4 hrs to fix

    Method load_into has 114 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def self.load_into(configuration)
        configuration.load do
          fanfare_require 'campy'
    
          set(:campfire_yaml_file) do
    Severity: Major
    Found in lib/capistrano/fanfare/campfire.rb - About 4 hrs to fix

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

        def self.load_into(configuration)
          configuration.load do
            set :scm,         :git
            set :use_sudo,    false
            set :user,        "deploy"
      Severity: Minor
      Found in lib/capistrano/fanfare/defaults.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

      Method load_into has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
      Open

        def self.load_into(configuration)
          configuration.load do
            def _cset(name, *args, &block)
              unless exists?(name)
                set(name, *args, &block)
      Severity: Minor
      Found in lib/capistrano/fanfare/console.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

      Method load_into has 67 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def self.load_into(configuration)
          configuration.load do
            set :scm,             :git
            set :deploy_via,      :git_style
            set(:release_name)    { %{#{Time.now.utc.strftime("%Y%m%d%H%M%S")}-#{real_revision}} }
      Severity: Major
      Found in lib/capistrano/fanfare/git_style.rb - About 2 hrs to fix

        Method load_into has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
        Open

          def self.load_into(configuration)
            configuration.load do
              fanfare_require 'campy'
        
              set(:campfire_yaml_file) do
        Severity: Minor
        Found in lib/capistrano/fanfare/campfire.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

        Method load_into has 59 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def self.load_into(configuration)
            configuration.load do
              set :tail_cmd, "tail"
        
              def resolve_logfile
        Severity: Major
        Found in lib/capistrano/fanfare/log.rb - About 2 hrs to fix

          Method load_into has 52 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def self.load_into(configuration)
              configuration.load do
                set :bundle_cmd,      "bundle"
                set :bundle_shebang,  "ruby-local-exec"
          
          
          Severity: Major
          Found in lib/capistrano/fanfare/bundler.rb - About 2 hrs to fix

            Method load_into has 51 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def self.load_into(configuration)
                configuration.load do
                  set :scm,         :git
                  set :use_sudo,    false
                  set :user,        "deploy"
            Severity: Major
            Found in lib/capistrano/fanfare/defaults.rb - About 2 hrs to fix

              Method load_into has 48 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def self.load_into(configuration)
                  configuration.load do
                    def _cset(name, *args, &block)
                      unless exists?(name)
                        set(name, *args, &block)
              Severity: Minor
              Found in lib/capistrano/fanfare/console.rb - About 1 hr to fix

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

                  def self.load_into(configuration)
                    configuration.load do
                      set :scm,             :git
                      set :deploy_via,      :git_style
                      set(:release_name)    { %{#{Time.now.utc.strftime("%Y%m%d%H%M%S")}-#{real_revision}} }
                Severity: Minor
                Found in lib/capistrano/fanfare/git_style.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 export has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                          def export
                            svp = configuration[:runit_sv_path]
                
                            run [
                              "svp=#{svp} &&",
                Severity: Minor
                Found in lib/capistrano/fanfare/foreman/strategy/runit.rb - About 1 hr to fix

                  Method load_into has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def self.load_into(configuration)
                      configuration.load do
                        fanfare_require 'foreman', 'foreman/procfile'
                  
                        set(:local_procfile)      { ENV['PROCFILE'] || "Procfile" }
                  Severity: Minor
                  Found in lib/capistrano/fanfare/foreman.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 load_into has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def self.load_into(configuration)
                      configuration.load do
                        set :tail_cmd, "tail"
                  
                        def resolve_logfile
                  Severity: Minor
                  Found in lib/capistrano/fanfare/log.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

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

                    def self.load_into(configuration)
                      configuration.load do
                        set :bundle_cmd,      "bundle"
                        set :bundle_shebang,  "ruby-local-exec"
                  
                  
                  Severity: Minor
                  Found in lib/capistrano/fanfare/bundler.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

                  Severity
                  Category
                  Status
                  Source
                  Language