diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index cc5c4f95..a32012f2 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -6,15 +6,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 5 -Lint/UselessAssignment: - Exclude: - - '_contrib/comparelinks.rb' - - '_plugins/alerts.rb' - - '_plugins/glossary.rb' - - '_plugins/inline-template.rb' - - '_plugins/releases.rb' - # Offense count: 20 Metrics/AbcSize: Max: 136 diff --git a/_contrib/comparelinks.rb b/_contrib/comparelinks.rb index 49aeb826..fdfb8bd6 100644 --- a/_contrib/comparelinks.rb +++ b/_contrib/comparelinks.rb @@ -29,7 +29,7 @@ end def fetchlinks() # Fetch new list of links links = {} - dirs = Dir.glob(WORKDIR + "/_site/**/*.html").each { |file| + Dir.glob(WORKDIR + "/_site/**/*.html").each { |file| content = File.read(file) content.scan(/ href *= *"(.*?)"/).each { |link| link = link[0].to_s.gsub(/^(https?:\/\/(www\.)?bitcoin\.org)?\//, '/') diff --git a/_plugins/alerts.rb b/_plugins/alerts.rb index 3993667c..77698808 100644 --- a/_plugins/alerts.rb +++ b/_plugins/alerts.rb @@ -70,7 +70,6 @@ module Jekyll lang = 'en' src = file dst = file - srcdir = '_alerts' dstdir = lang + '/alert' date = dst.split('-') next if date.length < 4 diff --git a/_plugins/glossary.rb b/_plugins/glossary.rb index 0541ed05..09cfd86d 100644 --- a/_plugins/glossary.rb +++ b/_plugins/glossary.rb @@ -131,8 +131,6 @@ module Jekyll devsearches_json = [] site.config["devsearches"].each { |cat, items| - devsearches_data_item = {} - if cat == "Glossary" items.each { |language, list| list.each { |el| diff --git a/_plugins/inline-template.rb b/_plugins/inline-template.rb index 8f334fb5..79cbf19d 100644 --- a/_plugins/inline-template.rb +++ b/_plugins/inline-template.rb @@ -22,7 +22,7 @@ module Jekyll output = super data = YAML.load(output) - template = File.open(@template_name, mode = "r") + template = File.open(@template_name) @mytemplate = Liquid::Template.parse(template.read()) @mytemplate.render('entry' => data) end diff --git a/_plugins/releases.rb b/_plugins/releases.rb index 03da5de0..d63744da 100644 --- a/_plugins/releases.rb +++ b/_plugins/releases.rb @@ -82,7 +82,6 @@ module Jekyll lang = 'en' src = file - srcdir = '_releases' output_directory = lang + '/release' site.pages << ReleasePage.new(site, site.source, lang, '_releases', src, output_directory) end