rubocop: Remove useless assignments
This commit is contained in:
parent
de0bcb6ce1
commit
584e891622
@ -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
|
||||
|
||||
@ -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)?\//, '/')
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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|
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user