diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-03-16 13:36:06 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-03-17 18:50:55 +0900 |
commit | 66bd2c1a1cea53dec4cf2d9e625ac01d3418863e (patch) | |
tree | c616f98bfd4241e232e3a93c895faf7a1f6c0856 | |
parent | 52ea7afa5f33d1a586866e0f12ede3b4a2a083e8 (diff) | |
download | ruby-66bd2c1a1cea53dec4cf2d9e625ac01d3418863e.tar.gz |
[rubygems/rubygems] util/rubocop -A --only Style/CommentAnnotation
https://github.com/rubygems/rubygems/commit/4e77a1d1d5
-rw-r--r-- | lib/rubygems/commands/help_command.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/config_file.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/dependency_installer.rb | 6 | ||||
-rw-r--r-- | lib/rubygems/ext/ext_conf_builder.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/installer.rb | 6 | ||||
-rw-r--r-- | lib/rubygems/platform.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/remote_fetcher.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/request.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/security/trust_dir.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/specification.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/uninstaller.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/validator.rb | 2 | ||||
-rw-r--r-- | test/rubygems/helper.rb | 2 | ||||
-rw-r--r-- | test/rubygems/test_gem_command_manager.rb | 12 | ||||
-rw-r--r-- | test/rubygems/test_gem_commands_cert_command.rb | 2 | ||||
-rw-r--r-- | test/rubygems/test_gem_commands_install_command.rb | 4 | ||||
-rw-r--r-- | test/rubygems/test_gem_installer.rb | 2 | ||||
-rw-r--r-- | test/rubygems/test_gem_security_policy.rb | 2 |
18 files changed, 28 insertions, 28 deletions
diff --git a/lib/rubygems/commands/help_command.rb b/lib/rubygems/commands/help_command.rb index a4d9f39d9a..a64c3e128d 100644 --- a/lib/rubygems/commands/help_command.rb +++ b/lib/rubygems/commands/help_command.rb @@ -268,7 +268,7 @@ Gem::Platform::CURRENT. This will correctly mark the gem with your ruby's platform. EOF - # NOTE when updating also update Gem::Command::HELP + # NOTE: when updating also update Gem::Command::HELP SUBCOMMANDS = [ ["commands", :show_commands], diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb index c1dda3404d..2d404361ec 100644 --- a/lib/rubygems/config_file.rb +++ b/lib/rubygems/config_file.rb @@ -201,7 +201,7 @@ class Gem::ConfigFile @hash = @hash.merge environment_config end - # HACK these override command-line args, which is bad + # HACK: these override command-line args, which is bad @backtrace = @hash[:backtrace] if @hash.key? :backtrace @bulk_threshold = @hash[:bulk_threshold] if @hash.key? :bulk_threshold @home = @hash[:gemhome] if @hash.key? :gemhome diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb index 941a5bda4c..701a1ff61f 100644 --- a/lib/rubygems/dependency_installer.rb +++ b/lib/rubygems/dependency_installer.rb @@ -18,12 +18,12 @@ class Gem::DependencyInstaller DEFAULT_OPTIONS = { # :nodoc: :env_shebang => false, :document => %w[ri], - :domain => :both, # HACK dup + :domain => :both, # HACK: dup :force => false, - :format_executable => false, # HACK dup + :format_executable => false, # HACK: dup :ignore_dependencies => false, :prerelease => false, - :security_policy => nil, # HACK NoSecurity requires OpenSSL. AlmostNo? Low? + :security_policy => nil, # HACK: NoSecurity requires OpenSSL. AlmostNo? Low? :wrappers => true, :build_args => nil, :build_docs_in_background => false, diff --git a/lib/rubygems/ext/ext_conf_builder.rb b/lib/rubygems/ext/ext_conf_builder.rb index 9254197009..37efe47141 100644 --- a/lib/rubygems/ext/ext_conf_builder.rb +++ b/lib/rubygems/ext/ext_conf_builder.rb @@ -43,7 +43,7 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder full_tmp_dest = File.join(extension_dir, tmp_dest_relative) - # TODO remove in RubyGems 4 + # TODO: remove in RubyGems 4 if Gem.install_extension_in_lib && lib_dir FileUtils.mkdir_p lib_dir entries = Dir.entries(full_tmp_dest) - %w[. ..] diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 96e777aaee..d0cf3ddf61 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -233,7 +233,7 @@ class Gem::Installer io.gets # blankline - # TODO detect a specially formatted comment instead of trying + # TODO: detect a specially formatted comment instead of trying # to find a string inside Ruby code. next unless io.gets.to_s.include?("This file was generated by RubyGems") @@ -346,7 +346,7 @@ class Gem::Installer spec - # TODO This rescue is in the wrong place. What is raising this exception? + # TODO: This rescue is in the wrong place. What is raising this exception? # move this rescue to around the code that actually might raise it. rescue Zlib::GzipFile::Error raise Gem::InstallError, "gzip error installing #{gem}" @@ -748,7 +748,7 @@ class Gem::Installer # Return the text for an application file. def app_script_text(bin_file_name) - # note that the `load` lines cannot be indented, as old RG versions match + # NOTE: that the `load` lines cannot be indented, as old RG versions match # against the beginning of the line return <<-TEXT #{shebang bin_file_name} diff --git a/lib/rubygems/platform.rb b/lib/rubygems/platform.rb index 3cfe5aa0a0..38ea93942a 100644 --- a/lib/rubygems/platform.rb +++ b/lib/rubygems/platform.rb @@ -36,7 +36,7 @@ class Gem::Platform end def self.match_gem?(platform, gem_name) - # Note: this method might be redefined by Ruby implementations to + # NOTE: this method might be redefined by Ruby implementations to # customize behavior per RUBY_ENGINE, gem_name or other criteria. match_platforms?(platform, Gem.platforms) end diff --git a/lib/rubygems/remote_fetcher.rb b/lib/rubygems/remote_fetcher.rb index 658752798e..6af0fea00f 100644 --- a/lib/rubygems/remote_fetcher.rb +++ b/lib/rubygems/remote_fetcher.rb @@ -169,7 +169,7 @@ class Gem::RemoteFetcher end verbose "Using local gem #{local_gem_path}" - when nil then # TODO test for local overriding cache + when nil then # TODO: test for local overriding cache source_path = if Gem.win_platform? && source_uri.scheme && !source_uri.path.include?(":") "#{source_uri.scheme}:#{source_uri.path}" diff --git a/lib/rubygems/request.rb b/lib/rubygems/request.rb index 1eeaa416fc..5657f48e07 100644 --- a/lib/rubygems/request.rb +++ b/lib/rubygems/request.rb @@ -241,7 +241,7 @@ class Gem::Request verbose "fatal error" raise Gem::RemoteFetcher::FetchError.new("fatal error", @uri) - # HACK work around EOFError bug in Net::HTTP + # HACK: work around EOFError bug in Net::HTTP # NOTE Errno::ECONNABORTED raised a lot on Windows, and make impossible # to install gems. rescue EOFError, Timeout::Error, diff --git a/lib/rubygems/security/trust_dir.rb b/lib/rubygems/security/trust_dir.rb index df59680d84..cb3943ab2b 100644 --- a/lib/rubygems/security/trust_dir.rb +++ b/lib/rubygems/security/trust_dir.rb @@ -49,7 +49,7 @@ class Gem::Security::TrustDir yield certificate, certificate_file rescue OpenSSL::X509::CertificateError - next # HACK warn + next # HACK: warn end end end diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 7acdb5c52a..21609bdfb6 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -1502,7 +1502,7 @@ class Gem::Specification < Gem::BasicSpecification def sanitize_string(string) return string unless string - # HACK the #to_s is in here because RSpec has an Array of Arrays of + # HACK: the #to_s is in here because RSpec has an Array of Arrays of # Strings for authors. Need a way to disallow bad values on gemspec # generation. (Probably won't happen.) string.to_s diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb index 79334d2d64..d5465b32fe 100644 --- a/lib/rubygems/uninstaller.rb +++ b/lib/rubygems/uninstaller.rb @@ -45,7 +45,7 @@ class Gem::Uninstaller # Constructs an uninstaller that will uninstall +gem+ def initialize(gem, options = {}) - # TODO document the valid options + # TODO: document the valid options @gem = gem @version = options[:version] || Gem::Requirement.default @gem_home = File.realpath(options[:install_dir] || Gem.dir) diff --git a/lib/rubygems/validator.rb b/lib/rubygems/validator.rb index b42a176ae3..a288eaaae1 100644 --- a/lib/rubygems/validator.rb +++ b/lib/rubygems/validator.rb @@ -108,7 +108,7 @@ class Gem::Validator good.each do |entry, data| begin - next unless data # HACK `gem check -a mkrf` + next unless data # HACK: `gem check -a mkrf` source = File.join gem_directory, entry["path"] diff --git a/test/rubygems/helper.rb b/test/rubygems/helper.rb index 16c5af8e3d..1d110c7e30 100644 --- a/test/rubygems/helper.rb +++ b/test/rubygems/helper.rb @@ -1045,7 +1045,7 @@ Also, a list: spec_fetcher.prerelease_specs[@uri] << spec.name_tuple end - # HACK for test_download_to_cache + # HACK: for test_download_to_cache unless Gem::RemoteFetcher === @fetcher v = Gem.marshal_version diff --git a/test/rubygems/test_gem_command_manager.rb b/test/rubygems/test_gem_command_manager.rb index d534d35742..05db017416 100644 --- a/test/rubygems/test_gem_command_manager.rb +++ b/test/rubygems/test_gem_command_manager.rb @@ -176,7 +176,7 @@ class TestGemCommandManager < Gem::TestCase assert_match(/invalid option: --bad-arg/i, @ui.error) end - # HACK move to install command test + # HACK: move to install command test def test_process_args_install # capture all install options use_ui @ui do @@ -227,7 +227,7 @@ class TestGemCommandManager < Gem::TestCase end end - # HACK move to uninstall command test + # HACK: move to uninstall command test def test_process_args_uninstall # capture all uninstall options check_options = nil @@ -247,7 +247,7 @@ class TestGemCommandManager < Gem::TestCase assert_equal Gem::Requirement.new("3.0"), check_options[:version] end - # HACK move to check command test + # HACK: move to check command test def test_process_args_check # capture all check options check_options = nil @@ -266,7 +266,7 @@ class TestGemCommandManager < Gem::TestCase assert_equal true, check_options[:alien] end - # HACK move to build command test + # HACK: move to build command test def test_process_args_build # capture all build options check_options = nil @@ -285,7 +285,7 @@ class TestGemCommandManager < Gem::TestCase assert_equal "foobar.rb", check_options[:args].first end - # HACK move to query command test + # HACK: move to query command test def test_process_args_query # capture all query options check_options = nil @@ -326,7 +326,7 @@ class TestGemCommandManager < Gem::TestCase assert_equal :both, check_options[:domain] end - # HACK move to update command test + # HACK: move to update command test def test_process_args_update # capture all update options check_options = nil diff --git a/test/rubygems/test_gem_commands_cert_command.rb b/test/rubygems/test_gem_commands_cert_command.rb index d8e015339b..45051fbf91 100644 --- a/test/rubygems/test_gem_commands_cert_command.rb +++ b/test/rubygems/test_gem_commands_cert_command.rb @@ -46,7 +46,7 @@ class TestGemCommandsCertCommand < Gem::TestCase matches = @cmd.certificates_matching "" - # HACK OpenSSL::X509::Certificate#== is Object#==, so do this the hard way + # HACK: OpenSSL::X509::Certificate#== is Object#==, so do this the hard way match = matches.next assert_equal ALTERNATE_CERT.to_pem, match.first.to_pem assert_equal @trust_dir.cert_path(ALTERNATE_CERT), match.last diff --git a/test/rubygems/test_gem_commands_install_command.rb b/test/rubygems/test_gem_commands_install_command.rb index 686be17c7c..0c93244f92 100644 --- a/test/rubygems/test_gem_commands_install_command.rb +++ b/test/rubygems/test_gem_commands_install_command.rb @@ -232,7 +232,7 @@ ERROR: Could not find a valid gem 'bar' (= 0.5) (required by 'foo' (>= 0)) in a assert_equal 2, e.exit_code end - # HACK no repository was checked + # HACK: no repository was checked assert_match(/ould not find a valid gem 'no_such_gem'/, @ui.error) end @@ -251,7 +251,7 @@ ERROR: Could not find a valid gem 'bar' (= 0.5) (required by 'foo' (>= 0)) in a assert_equal 2, e.exit_code end - # HACK no repository was checked + # HACK: no repository was checked assert_match(/ould not find a valid gem 'no_such_gem'/, @ui.error) end diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb index 1ae9c98fc4..300cf9eb6d 100644 --- a/test/rubygems/test_gem_installer.rb +++ b/test/rubygems/test_gem_installer.rb @@ -496,7 +496,7 @@ gem 'other', version wrapper = File.read installed_exec assert_match %r{generated by RubyGems}, wrapper - # HACK some gems don't have #! in their executables, restore 2008/06 + # HACK: some gems don't have #! in their executables, restore 2008/06 # assert_no_match %r|generated by RubyGems|, wrapper end diff --git a/test/rubygems/test_gem_security_policy.rb b/test/rubygems/test_gem_security_policy.rb index f272e554e5..e12d43fa5a 100644 --- a/test/rubygems/test_gem_security_policy.rb +++ b/test/rubygems/test_gem_security_policy.rb @@ -33,7 +33,7 @@ class TestGemSecurityPolicy < Gem::TestCase end @digest = OpenSSL::Digest.new Gem::Security::DIGEST_NAME - @trust_dir = Gem::Security.trust_dir.dir # HACK use the object + @trust_dir = Gem::Security.trust_dir.dir # HACK: use the object @no = Gem::Security::NoSecurity @almost_no = Gem::Security::AlmostNoSecurity |