Commit 1f467521 authored by intrigeri's avatar intrigeri
Browse files

Rubocop: make Style/TrailingCommaInArrayLiteral consistent

Changes generated with:

`rubocop --only Style/TrailingCommaInArrayLiteral --auto-correct`
parent 3aa6adde
......@@ -12,5 +12,7 @@ Style/ClassVars:
Exclude:
- 'features/support/helpers/dogtail.rb'
- 'features/support/helpers/remote_shell.rb'
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: consistent_comma
......@@ -804,21 +804,6 @@ Style/TrailingCommaInArguments:
- 'features/step_definitions/chutney.rb'
- 'features/step_definitions/common_steps.rb'
# Offense count: 23
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
Style/TrailingCommaInArrayLiteral:
Exclude:
- 'Rakefile'
- 'bin/sanity-check-website'
- 'features/step_definitions/chutney.rb'
- 'features/step_definitions/snapshots.rb'
- 'features/step_definitions/totem.rb'
- 'features/support/extra_hooks.rb'
- 'features/support/helpers/dogtail.rb'
- 'features/support/hooks.rb'
# Offense count: 16
# Cop supports --auto-correct.
# Configuration parameters: MinSize, WordRegex.
......
......@@ -455,7 +455,7 @@ task :build => [
'validate_http_proxy',
'ensure_correct_permissions',
'vm:up',
'ensure_clean_home_directory'
'ensure_clean_home_directory',
] do
begin
if ENV['TAILS_RAM_BUILD'] && not(enough_free_memory_for_ram_build?)
......
......@@ -82,7 +82,7 @@ def read_package_manifest_file_as_package_map(path)
.map do |entry|
[
entry['package'],
entry.clone.delete_if { |k, _| k == 'package' }
entry.clone.delete_if { |k, _| k == 'package' },
]
end
.to_h
......
......@@ -42,7 +42,7 @@ def ensure_chutney_is_running
# processes are killed manually.
begin
cmd_helper(["pkill", "--full", "--exact",
"tor -f #{env['CHUTNEY_DATA_DIR']}/nodes/.*/torrc --quiet"])
"tor -f #{env['CHUTNEY_DATA_DIR']}/nodes/.*/torrc --quiet",])
rescue
end
......
......@@ -210,7 +210,7 @@ When /^I join some empty multi-user chat$/ do
# that it is empty. We'll also deal with the *potential* "Create New
# Room" prompt that Pidgin shows for some server configurations.
images = ["PidginCreateNewRoomPrompt.png",
"PidginChat1UserInRoom.png"]
"PidginChat1UserInRoom.png",]
image_found, = @screen.wait_any(images, 30)
if image_found == "PidginCreateNewRoomPrompt.png"
@screen.click("PidginCreateNewRoomAcceptDefaultsButton.png")
......
......@@ -6,7 +6,7 @@ def checkpoints
:steps => [
'the network is unplugged',
'I start the computer',
'the computer boots Tails'
'the computer boots Tails',
],
},
......
......@@ -23,7 +23,7 @@ When /^I start Thunderbird$/ do
# When we generate a random subject line it may contain one of the
# keywords that will make Thunderbird show an extra prompt when trying
# to send an email. Let's disable this feature.
'pref("mail.compose.attachment_reminder", false);'
'pref("mail.compose.attachment_reminder", false);',
]
workaround_pref_lines.each do |line|
$vm.file_append('/etc/thunderbird/pref/thunderbird.js', line)
......
......@@ -203,7 +203,7 @@ When /^I fetch the "([^"]+)" OpenPGP key using Seahorse( via the OpenPGP Applet)
@screen.type(keyid, ["Return"])
begin
@screen.wait_any(['SeahorseFoundKeyResult.png',
'GnomeCloseButton.png'], 120)
'GnomeCloseButton.png',], 120)
rescue FindFailed
# We may end up here if Seahorse appears to be "frozen".
# Sometimes--but not always--if we click another window
......
......@@ -12,7 +12,7 @@ def supported_torbrowser_languages
first, second = line.sub('-', '_').split(':')
candidates = ["#{first}_#{second}.UTF-8", "#{first}_#{second}.utf8",
"#{first}.UTF-8", "#{first}.utf8",
"#{first}_#{second}", first]
"#{first}_#{second}", first,]
when_not_found = Proc.new { raise "Could not find a locale for '#{line}'" }
candidates.find(when_not_found) do |candidate|
$vm.directory_exist?("/usr/lib/locale/#{candidate}")
......
......@@ -750,7 +750,7 @@ def iuk_changes(version)
filesystem: :medium,
path: 'utils/linux/syslinux',
status: :removed,
}
},
]
case version
......@@ -775,7 +775,7 @@ def iuk_changes(version)
filesystem: :medium,
path: 'utils/mbr/mbr.bin',
status: :removed,
}
},
]
else
raise "Test suite implementation error: unsupported version #{version}"
......
......@@ -57,7 +57,7 @@ loop do
"git",
sanitize_filename(describe_git_head,
:replacement => '-'),
current_short_commit
current_short_commit,
].reject(&:empty?).join("_") + "-" +
random_alnum_string(6)
if not(File.exist?(ARTIFACTS_DIR))
......@@ -79,7 +79,7 @@ MISC_FILES_DIR = "#{Dir.pwd}/features/misc_files"
SERVICES_EXPECTED_ON_ALL_IFACES =
[
["cupsd", "*", "631"],
["dhclient", "0.0.0.0", "68"]
["dhclient", "0.0.0.0", "68"],
]
# OpenDNS
SOME_DNS_SERVER = "208.67.222.222"
......
......@@ -136,7 +136,7 @@ module Cucumber::Cli
BUILTIN_FORMATS['pretty_debug'] =
[
'ExtraFormatters::PrettyDebug',
'Prints the feature with debugging information - in colours.'
'Prints the feature with debugging information - in colours.',
]
BUILTIN_FORMATS['debug'] = BUILTIN_FORMATS['pretty_debug']
end
......
......@@ -22,7 +22,7 @@ class ChatBot
"#{GIT_DIR}/features/scripts/otr-bot.py",
@account,
@password,
@otr_key_file.path
@otr_key_file.path,
]
if @opts["connect_server"]
cmd += ["--connect-server", @opts["connect_server"]]
......
......@@ -7,7 +7,7 @@ class Display
def active?
p = IO.popen(["xprop", "-display", @x_display,
"-name", "#{@domain} (1) - Virt Viewer",
:err => ["/dev/null", "w"]])
:err => ["/dev/null", "w"],])
Process.wait(p.pid)
$?.success?
end
......@@ -19,7 +19,7 @@ class Display
"--connect", "qemu:///system",
"--display", @x_display,
@domain,
:err => ["/dev/null", "w"]])
:err => ["/dev/null", "w"],])
# We wait for the display to be active to not lose actions
# (e.g. key presses) that come immediately after starting (or
# restoring) a vm
......
......@@ -19,7 +19,7 @@ module OpenCV
end
p = popen_wait(
[env, @python, "#{GIT_DIR}/features/scripts/opencv_match_template.py",
screen, image, sensitivity.to_s, show_match.to_s],
screen, image, sensitivity.to_s, show_match.to_s,],
err: [:child, :out]
)
out = p.readlines.join("\n")
......
......@@ -371,7 +371,7 @@ class ImageBumpingScreen
screen_methods = Screen.instance_methods - Object.instance_methods
overrides = [:find, :exists, :wait, :find_any, :exists_any,
:wait_any, :hover, :click]
:wait_any, :hover, :click,]
screen_methods.each do |m|
if overrides.include?(m)
define_method(m) do |*args, **opts|
......
......@@ -29,7 +29,7 @@ class Sniffer
"--immediate-mode",
"-i", @vmnet.bridge_name,
"-w", @pcap_file,
:err => ["/dev/null", "w"]
:err => ["/dev/null", "w"],
]
)
@pid = job.pid
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment