Showing 319 of 319 total issues
json Gem for Ruby Unsafe Object Creation Vulnerability (additional fix) Open
json (2.0.3)
- Read upRead up
- Exclude checks
Method has too many lines. [30/10] Open
def check_links begin require 'anemone' root = 'http://localhost:4000/'
- Read upRead up
- Exclude checks
Assignment Branch Condition size for check_links is too high. [25.4/15] Open
def check_links begin require 'anemone' root = 'http://localhost:4000/'
- Read upRead up
- Exclude checks
Method has too many lines. [15/10] Open
def write_new_draft() filename = get_unique_filename full_path = File.join(@post_dir, filename) File.open(full_path, 'w') do |f| f.puts "---"
- Read upRead up
- Exclude checks
Cyclomatic complexity for parse_date is too high. [8/6] Open
def parse_date(date) # This looks cleaner but logic is incorrect #if (date.nil? || # date.empty? || # date.match(/[0-9]+-[0-9]+-[0-9]+/).nil?) then
- Read upRead up
- Exclude checks
Assignment Branch Condition size for get_unique_filename is too high. [16.79/15] Open
def get_unique_filename() # TODO: Global Variable filename = @date[0..9] + "-" + JekyllRake::Utils.slugify(@title) + $post_ext # TODO: refactor - very difficult to understand without the comment
- Read upRead up
- Exclude checks
Perceived complexity for parse_date is too high. [8/7] Open
def parse_date(date) # This looks cleaner but logic is incorrect #if (date.nil? || # date.empty? || # date.match(/[0-9]+-[0-9]+-[0-9]+/).nil?) then
- Read upRead up
- Exclude checks
Assignment Branch Condition size for parse_date is too high. [15.65/15] Open
def parse_date(date) # This looks cleaner but logic is incorrect #if (date.nil? || # date.empty? || # date.match(/[0-9]+-[0-9]+-[0-9]+/).nil?) then
- Read upRead up
- Exclude checks
Assignment Branch Condition size for write_new_draft is too high. [15.26/15] Open
def write_new_draft() filename = get_unique_filename full_path = File.join(@post_dir, filename) File.open(full_path, 'w') do |f| f.puts "---"
- Read upRead up
- Exclude checks
Method check_links
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def check_links begin require 'anemone' root = 'http://localhost:4000/'
Method check_links
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def check_links begin require 'anemone' root = 'http://localhost:4000/'
- Read upRead up
Method set_post_dir_and_yaml_cat
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def set_post_dir_and_yaml_cat(dir) # Written like this to deal with category being nil if @category and Dir.exists?(File.join(@category, dir)) then @post_dir = File.join(@category, dir) @yaml_cat = nil
- Read upRead up
Block has too many lines. [26/25] Open
Gem::Specification.new do |spec| spec.name = "jekyll_rake" spec.version = JekyllRake::VERSION spec.authors = ["Sebastian Carroll"] spec.email = ["scarroll@hortonworks.com"]
- Read upRead up
- Exclude checks
Space between { and | missing. Open
Dir.glob("./#{cur_dir}/lib/**/*").select{|f| File.file? f}.each{|f| require f}
- Read upRead up
- Exclude checks
Unused block argument - t
. You can omit all the arguments if you don't care about them. Open
task :list_changes do |t, args|
- Read upRead up
- Exclude checks
Line is too long. [94/80] Open
puts "\n\nWarning! It seems that the local repository is not in sync with the remote.\n"
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Rake::Task["create_post"].invoke(Time.new.strftime("%Y-%m-%d %H:%M:%S"), "Recent Changes", nil, content)
- Read upRead up
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
t.libs << "lib"
- Read upRead up
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
spec.bindir = "exe"
- Read upRead up
- Exclude checks