rubocop: Remove useless assignments

This commit is contained in:
Will Binns 2019-06-05 09:06:46 +02:00 committed by Will Binns
parent de0bcb6ce1
commit 584e891622
6 changed files with 2 additions and 15 deletions

View File

@ -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

View File

@ -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)?\//, '/')

View File

@ -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

View File

@ -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|

View File

@ -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

View File

@ -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