Showing 6 of 8 total issues
Class Application
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Application
include FileUtils
def self.run(strategy)
new.run(strategy)
File application.rb
has 288 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require 'safe_yaml'
require 'uri'
require 'tachikoma'
require 'octokit'
require 'fileutils'
Method bundler
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def bundler
Dir.chdir("#{Tachikoma.repos_path}/#{@build_for}") do
Bundler.with_clean_env do
sh(*['ruby', '-i', '-pe', '$_.gsub! /^ruby/, "#ruby"', 'Gemfile'])
sh(*['git', 'config', 'user.name', @commiter_name])
Method load
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def load
@build_for = ENV['BUILD_FOR']
@github_token = ENV[github_token_key(@build_for)]
base_config_path = File.join(Tachikoma.original_data_path, 'default.yaml')
Method bundler
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def bundler
Dir.chdir("#{Tachikoma.repos_path}/#{@build_for}") do
Bundler.with_clean_env do
sh(*['ruby', '-i', '-pe', '$_.gsub! /^ruby/, "#ruby"', 'Gemfile'])
sh(*['git', 'config', 'user.name', @commiter_name])
- Read upRead up
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
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def load
@build_for = ENV['BUILD_FOR']
@github_token = ENV[github_token_key(@build_for)]
base_config_path = File.join(Tachikoma.original_data_path, 'default.yaml')
- Read upRead up
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"