SebastianCarroll/jekyll-rakefile

View on GitHub

Showing 319 of 319 total issues

OS Command Injection in Rake
Open

rake (10.4.2)
Severity: Critical
Found in Gemfile.lock by bundler-audit

json Gem for Ruby Unsafe Object Creation Vulnerability (additional fix)
Open

json (2.0.3)
Severity: Critical
Found in Gemfile.lock by bundler-audit

Method has too many lines. [30/10]
Open

def check_links
begin
require 'anemone'
 
root = 'http://localhost:4000/'
Severity: Minor
Found in lib/tools.rb by rubocop

Assignment Branch Condition size for check_links is too high. [25.4/15]
Open

def check_links
begin
require 'anemone'
 
root = 'http://localhost:4000/'
Severity: Minor
Found in lib/tools.rb by rubocop

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 "---"
Severity: Minor
Found in lib/jekyll_rake/post.rb by rubocop

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
Severity: Minor
Found in lib/jekyll_rake/post.rb by rubocop

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
Severity: Minor
Found in lib/jekyll_rake/post.rb by rubocop

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
Severity: Minor
Found in lib/jekyll_rake/post.rb by rubocop

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
Severity: Minor
Found in lib/jekyll_rake/post.rb by rubocop

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 "---"
Severity: Minor
Found in lib/jekyll_rake/post.rb by rubocop

Method check_links has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def check_links
begin
require 'anemone'
 
root = 'http://localhost:4000/'
Severity: Minor
Found in lib/tools.rb - About 1 hr to fix

    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/'
    Severity: Minor
    Found in lib/tools.rb - About 25 mins to fix

    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
    Severity: Minor
    Found in lib/jekyll_rake/post.rb - About 25 mins to fix

    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"]
    Severity: Minor
    Found in jekyll_rake.gemspec by rubocop

    Space between { and | missing.
    Open

    Dir.glob("./#{cur_dir}/lib/**/*").select{|f| File.file? f}.each{|f| require f}
    Severity: Minor
    Found in Rakefile.deploy.rb by rubocop

    Unused block argument - t. You can omit all the arguments if you don't care about them.
    Open

    task :list_changes do |t, args|
    Severity: Minor
    Found in Rakefile.deploy.rb by rubocop

    Line is too long. [94/80]
    Open

    puts "\n\nWarning! It seems that the local repository is not in sync with the remote.\n"
    Severity: Minor
    Found in Rakefile.deploy.rb by rubocop

    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)
    Severity: Minor
    Found in Rakefile.deploy.rb by rubocop

    Prefer single-quoted strings when you don't need string interpolation or special symbols.
    Open

    t.libs << "lib"
    Severity: Minor
    Found in Rakefile by rubocop

    Prefer single-quoted strings when you don't need string interpolation or special symbols.
    Open

    spec.bindir = "exe"
    Severity: Minor
    Found in jekyll_rake.gemspec by rubocop
    Severity
    Category
    Status
    Source
    Language