Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Mar 8, 2024
1 parent b1368e1 commit d1aa0ea
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion bin/commit-cache-update.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'jekyll'
require './_plugins/gtn/mod.rb'
require './_plugins/gtn/mod'

# Write the commit log
Gtn::ModificationTimes.generate_cache
Expand Down
26 changes: 12 additions & 14 deletions bin/lint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def self.check_bad_cite(contents)
def self.check_bad_icon(contents)
find_matching_texts(contents, /{%\s*icon\s+([^%]*)\s*%}/i)
.map do |idx, _text, selected|
icon_key = selected[1].strip.split(' ')[0]
icon_key = selected[1].strip.split[0]
if jekyll_config['icon-tag'][icon_key].nil?
ReviewDogEmitter.error(
path: @path,
Expand Down Expand Up @@ -1079,21 +1079,19 @@ def self.fix_file(path)
end

test = YAML.safe_load(File.open(test_file))
test_plain = File.open(test_file).read
test_plain = File.read(test_file)
# check that for each test, the outputs is non-empty
test.each do |test_job|
if test_job['outputs'].nil? || test_job['outputs'].empty?
if ! test_plain.match(/GTN_RUN_SKIP_REASON/)
results += [
ReviewDogEmitter.file_error(path: path,
message: 'This workflow test does not test the contents of outputs, ' \
'which is now mandatory. Please see [the FAQ on how to add ' \
'tests to your workflows](' \
'https://training.galaxyproject.org/training-material/faqs/' \
'gtn/gtn_workflow_testing.html).',
code: 'GTN:030')
]
end
if (test_job['outputs'].nil? || test_job['outputs'].empty?) && !test_plain.match(/GTN_RUN_SKIP_REASON/)
results += [
ReviewDogEmitter.file_error(path: path,
message: 'This workflow test does not test the contents of outputs, ' \
'which is now mandatory. Please see [the FAQ on how to add ' \
'tests to your workflows](' \
'https://training.galaxyproject.org/training-material/faqs/' \
'gtn/gtn_workflow_testing.html).',
code: 'GTN:030')
]
end
end
end
Expand Down

0 comments on commit d1aa0ea

Please sign in to comment.