fnichol/capistrano-fanfare

View on GitHub

Showing 18 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

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

                            namespace :stop do
                              procfile.entries do |name, command|
                                send :desc, <<-DESC
                                  Stops #{name} processes managed by the Procfile.
                                DESC
                  Severity: Minor
                  Found in lib/capistrano/fanfare/foreman.rb and 2 other locations - About 20 mins to fix
                  lib/capistrano/fanfare/foreman.rb on lines 102..108
                  lib/capistrano/fanfare/foreman.rb on lines 124..130

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

                  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 3 locations. Consider refactoring.
                  Open

                            namespace :start do
                              procfile.entries do |name, command|
                                send :desc, <<-DESC
                                  Starts #{name} processes managed by the Procfile.
                                DESC
                  Severity: Minor
                  Found in lib/capistrano/fanfare/foreman.rb and 2 other locations - About 20 mins to fix
                  lib/capistrano/fanfare/foreman.rb on lines 113..119
                  lib/capistrano/fanfare/foreman.rb on lines 124..130

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

                  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 3 locations. Consider refactoring.
                  Open

                            namespace :restart do
                              procfile.entries do |name, command|
                                send :desc, <<-DESC
                                  Restarts #{name} processes managed by the Procfile.
                                DESC
                  Severity: Minor
                  Found in lib/capistrano/fanfare/foreman.rb and 2 other locations - About 20 mins to fix
                  lib/capistrano/fanfare/foreman.rb on lines 102..108
                  lib/capistrano/fanfare/foreman.rb on lines 113..119

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

                  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

                  Severity
                  Category
                  Status
                  Source
                  Language